Linux tutorials often expect you to perform certain operations in the terminal, which can be intimidating at first. But don't get angry; This Linux command cheat sheet covers the process of opening a terminal and issuing some useful commands.
Linux command prompt for beginners
The basic Linux commands that you can find below are universal to almost every Linux distribution, from the Ubuntu command line to Kali Linux. Your terminal may look different from the one in the following pictures, but you can be sure that this will work for you.
Note that in different online manuals you will often hear different expressions referring to the same action: "open a shell", "start bash", or "from the command line". They all mean you should open up the terminal and type in, which we are going to do below.
How to open a terminal on Linux
Look in your application menu for terminal. It will often be called a "terminal emulator," and that's exactly what you want.
However, the quickest way to open a terminal is by using the keyboard shortcut Ctrl + Alt + T..
Basic Linux commands for beginners
After opening a terminal, you can enter a few commands. Let's look at some of the most basic shell commands on Linux.
1. Display the working directory
Knowing the current "working directory" is of the utmost importance when using the terminal. Many commands cause changes to be made in the current directory and you don't want to make those changes in the wrong directory.
You can use this command to check which directory you are currently working in print the working directory:
Show the contents of the working directory
Issue those ls Command if you want to display all files and folders in the current directory:
Files are displayed in plain text, while folders are bold and colored.
If you want to see hidden files too, just add those -on or –all Possibility:
2. Change directories
You can change your current working directory with CD, an abbreviation for chang directories.
The above command searches for the "Documents" folder in your current working directory and changes to this directory after it is found.
Make sure that whenever you specify a file or directory with a space in the name, enclose it in quotation marks. Otherwise an error message will be displayed.
You can move up a directory by adding that .. Possibility:
If you output your own CD without specifying a storage location, you will go directly to your original directory:
3. Print the output of a command
The echo The command takes whatever input you give it, be it a text string or some other command, and prints it out in Terminal.
Echo "Hello world!"
Echo on its own may seem useless, but you will find that it is widely used in Linux systems administration.
Show file contents
The cat-clinking command cat prints the complete contents of all files you have named in the terminal.
4. Browse the contents of a file
Use the key to search the contents of a file for a specific word or phrase grep Command.
grep "search term" filename.txt
This command is very useful when you are looking for specific information in long and complex system files.
5. Redirect command output
The symbol "greater than", >has the ability in command strings to redirect the output of a command to a file or other command.
For example, this command takes the output from echo and saves it in a plain text file named "file.txt":
Echo "Hello world!" > file.txt
6. System update (Ubuntu-based systems)
Enter these two commands in any Ubuntu shell to check for any available updates and apply them to your system.
sudo apt update
sudo apt full upgrade
You will be asked to enter your user password before confirming a command with the prefix sudo.
Pro tip: You can use to combine two or more commands into one && Operator.
sudo apt update && sudo apt full upgrade
Linux Terminal Keyboard Shortcuts for Beginners
Learning keyboard shortcuts is difficult at first, but it saves a huge amount of time in the long run. Linux has many useful shortcuts, and we'll list some of the most helpful terminal shortcuts below.
7. Recall previous commands
If you want to repeat a recently used command but don't remember or re-enter it, the command can be used to scroll through the command history Up and Down Arrow Keys.
Alternatively, you can hit Ctrl + R. to search your command history for a specific keyword or phrase.
8. See suggested commands
Sometimes when using the Terminal you will invoke part of a command but are not sure how it is written or what options to use. When entering a command, press the key tab Key, the terminal will try to finish your command for you or show you different options.
9. End a terminal process
Maybe you already know Ctrl + C. As a keyboard shortcut to copy to clipboard, but using this keyboard shortcut in the terminal will terminate any running commands you may regret.
Linux for beginners
The best way to remember these Linux terminal commands and shortcuts is to use them. So open the command line and start typing!
Do you want more orders? Check out our Linux commands cheat sheet.
To help you find out what's possible on Linux, we've put together a comprehensive look at the best software available for Linux, organized by category.
The best Linux software and apps
Whether you are new to Linux or you are a seasoned user, this is where you can find the best Linux software and apps that you should be using today.
About the author
(22 articles published)
Jordan is a tutor and journalist who is passionate about making Linux accessible and stress-free for everyone. He has a BA in English and a hot tea thing. During the warmer months of the year he enjoys cycling on the Ozark hills where he lives.
By Jordan Gloor
Subscribe to our newsletter
Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive deals!
One more step …!
Please confirm your email address in the email we just sent you.