The terminal can look a little intimidating at first, but don’t worry - it’s simply a way to tell your computer what to do using text commands instead of a mouse. It’s fast, powerful, and once you learn a few basics, it becomes one of the most useful tools on your system.
Don’t be afraid to experiment - most commands are completely safe to try.
If something doesn’t work, the terminal will usually just return an error message, not break anything.
And remember: you can always close the terminal window or type exit to get out of a session.
About This Guide
This quick guide is designed to help new users get started with the terminal.
The terminal uses keyboard input only, and while commands can vary between operating systems, the examples below are for Ubuntu’s GNOME Terminal.
Most of these commands will also work on other Linux distributions - if they don’t, you can search for the equivalent ones for your specific distro.
Opening the Terminal
You can open the terminal in a couple of ways:
-
Open the GNOME Launcher and search for Terminal.
-
Or, on most Linux distributions, press Ctrl + Alt + T to open it directly.
Using the Tab Key
This might sound odd, but it’s one of the most common tips we give at Star Labs:
Tab is your friend.
Pressing the Tab key auto-completes commands or filenames.
For example, if you type:
and press Tab, you’ll see a list of all commands starting with “do”:
If there’s only one match, Tab will complete it automatically.
For instance, typing do-r and pressing Tab becomes:
Navigating the File System
Learning how to move around your system is one of the first steps.
-
Show your current directory:
Example output:
-
Change to another directory:
-
Go back to the parent directory:
-
List files and folders:
-
Include hidden files:
Running Commands as Superuser
Some tasks (like installing software or updating the system) require administrator permissions.
To run a command with those permissions, use sudo before it.
-
Run a command as superuser:
-
Install a program:
-
Update installed packages:
-
Upgrade packages automatically:
-
Upgrade packages and dependencies:
-
Remove unused dependencies:
-
Search for installed programs by keyword:
Viewing and Editing Files
You can read or edit text files right from the terminal:
-
View a file’s contents:
-
Edit or create a file:
Help Centre