The terminal isn’t just a “cool-looking black box”—it’s more like a productivity lever: for the same task that would take 10 mouse clicks, one line in the terminal does the job. Plus, it’s reusable, copyable, and replayable.
1. What is a Shell?
The black box you see is called the Terminal (terminal emulator), and the program running inside is called the Shell.
The Shell receives your commands, translates them for the operating system kernel, and then returns the result to you.
- Bash (Bourne Again SHell): Ubuntu’s default shell and the most widely used.
- Zsh: A more powerful shell that’s very popular with developers (the guide will show you how to install it later).
2. Open the Terminal
- Shortcut:
Ctrl + Alt + T(commit this shortcut to memory!). - Or search for “Terminal” in Activities.
3. Reading the Command Prompt
After opening the terminal, you’ll see a line like this:
user@hostname:~$
user: The current logged-in username.hostname: Your computer’s host name.~: The current directory.~stands for the home directory, i.e./home/user.$: Means you’re a regular user. If you see#, it means you’re root—that’s dangerous, so operate with care.
4. Essential Navigation Commands
In the terminal, you don’t have a mouse anymore—you need to “move around” with commands.
First, remember these two path concepts:
- Absolute path: Starts with
/(like/home/user/Downloads) - Relative path: Starts from the current directory (like
Downloads,../Documents)
pwd (Print Working Directory)
Where am I?
Displays your current full path.
pwd
# Output: /home/user
ls (List)
What’s here?
Lists files and folders in the current directory.
ls
ls -l # Show detailed info (permissions, size, time)
ls -a # Show hidden files (files beginning with .)
cd (Change Directory)
Where am I going?
Switch directories.
cd Downloads # Go into the Downloads directory
cd .. # Go up one directory
cd ~ # Go back to home directory
cd / # Go to root directory
mkdir (Make Directory)
Build a new house
Create a new folder.
mkdir Projects
touch
Make something new
Create an empty file.
touch readme.txt
cp (Copy)
Clone jutsu
Copy files or folders.
cp file.txt file_backup.txt
cp -r folder1 folder2 # Add -r (for Recursive) to copy folders
mv (Move)
Move/rename
Move files or rename them.
mv file.txt Documents/ # Move
mv oldname.txt newname.txt # Rename
rm (Remove)
Destruction time
Delete files. Note: Deleting from the Linux terminal usually doesn’t go to any recycle bin—once deleted, it’s really gone!
rm file.txt
rm -rf foldername # Force delete a folder and its contents (be careful!)
5. Useful Tips
- Tab for auto-completion: Type
cd Doand pressTab, it will autocomplete ascd Downloads/. This is the single most important trick. - Up and down arrows: Browse through command history without retyping.
- Ctrl + C: Force quit the current program (handy if it freezes).
- Ctrl + L or type
clear: Clear the screen.
Two more “safety tips”:
- Read the help before running a command:
command --helporman command(for example,man ls) - Use quotes for paths with spaces: Like
cd "My Files", or else the command will break into parts.
Try using these commands a few times—you’ll find your fingers fly across the keyboard way faster than dragging a mouse.
Beginner Ubuntu Tutorial · Contents
02. Preparing for Ubuntu and Choosing an Installation Method
03. Step-by-Step Guide: Installing Ubuntu 24.04 LTS
04. Getting Started with the GNOME Desktop Environment
05. Installing and Managing Software: Goodbye, .exe