beginner 15 minutes

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
1

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.

2

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 ~
3

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.

4

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
5

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
6

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
7

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
On this page