Linux Terminal Basics for Beginners
Learn the essential Linux terminal commands every beginner should know — navigation, files, permissions, and more.
Prerequisites
- Any Linux distribution installed
- Access to a terminal emulator
Open Your Terminal
On most Linux desktops, press Ctrl+Alt+T to open a terminal. You'll see a prompt like user@hostname:~$ — this is where you type commands.
Navigate the File System
Use pwd to see where you are, ls to list files, and cd to change directories. The tilde ~ is a shortcut for your home directory.
pwd ls -la cd Documents cd ~
Create and Remove Files & Folders
Use mkdir to create directories, touch to create empty files, and rm to remove them.
mkdir my-project touch my-project/notes.txt rm my-project/notes.txt rmdir my-project
Be very careful with rm -rf — it deletes files permanently without confirmation.
Read and Edit Files
Use cat to print file contents, less to scroll through large files, and nano for simple editing.
cat /etc/hostname less /var/log/syslog nano ~/notes.txt
Understand Permissions
Every file has an owner, a group, and permissions. Use ls -l to see them and chmod to change them. The format is rwx (read, write, execute) for owner, group, and others.
ls -l myfile.txt chmod 755 myscript.sh chmod +x myscript.sh
Install Software with Your Package Manager
On Debian/Ubuntu, use apt. On Fedora, use dnf. On Arch, use pacman. Always update your package list first.
sudo apt update sudo apt install htop sudo apt remove htop
Useful Shortcuts and Tips
A few things that will save you a lot of time:
- Tab — auto-complete file names and commands
- Ctrl+C — cancel the current command
- Ctrl+R — search command history
- Up/Down arrows — scroll through previous commands
- man
— read the manual for any command