Basic Linux Command Guide

New to Linux? We've got you covered.

Learn the essential Linux commands for controlling your Linux system.

Beginner-Friendly Terminal-Basic
Linux Logo

Filesystem Navigation

pwdPrint working directory
lsList files and directories ('-a' to include Hidden files and directories)
cdChange directory ('..' to go 1 step backwards)
treeView directory tree of the current directory

File & Directory Operations

mkdirCreate new directory
touchCreate empty file or update timestamp
cpCopy files ('-r' for directories)
mvMove or rename items
rmRemove files or directories (⚠️ Removes Permanently without sending to Trash)

Inspect & Search

catPrint file contents
lessPage through text files
grepSearch within files
findLocate files by name or attributes
locateQuick search using database

Permissions & Ownership

whoamiPrint the Current User
groupsList User's Privileges (add username to see other user's privileges )
chmodChange file permissions
chownChange file owner or group
sudoRun command with elevated privileges ('su' for root access)

System Monitoring

topInteractive process viewer
htopAdvanced process monitor
psList running processes ('aux' to include background processes)
killTerminate processes ('pkill' to)

Disk & Resource Info

dfShow filesystem disk usage (-h to include used storage)
duShow directory disk usage
freeDisplay memory usage
uname -aShow full kernel and system info

Shell Shortcuts

echoBash version of "print" in python (Print text or variables)
historyShow recent commands used
hostnameShow device name (add a name to change temporarily)
aliasCreate command shortcuts
exitClose The Shell

Package & Network

apt updateRefresh package lists (recommended with sudo)
gitDownload a GitHub Repository
curlFetch a URL from the shell
wgetDownload files from the web
sshConnect to a remote machine

Terminal Keyboard Shortcuts Pt.1

Ctrl + AMove to the beginning of the line
Ctrl + EMove to the end of the line
Ctrl + UDelete from cursor to beginning of line
Ctrl + KDelete from cursor to end of line
Ctrl + YPaste the last deleted text

Terminal Keyboard Shortcuts Pt.2

Ctrl + Alt + CCopy the selected text
Ctrl + Alt + VPaste the copied text
Ctrl + BMove backward one character
Ctrl + FMove forward one character
Alt + BMove backward one word
Alt + FMove forward one word

Quick Reference Examples:

user@device:~$ whoami user user@device:~$ hostname device user@device:~$ pwd /home/user user@device:~$ ls Desktop Documents Downloads Music Pictures Public Templates Videos user@device:~$ cd Desktop user@device:~/Desktop$ user@device:~$ tree . ├── Desktop │   └── executable1.txt ├── Documents │   └── executable2.txt ├── Downloads │   └── executable3.txt ├── Music │   └── audio4.mp3 ├── Pictures │   └── photo5.png ├── Public │   └── unexecutable6.txt ├── Templates │   └── unexecutable7.txt └── Videos └── video8.mp4 9 directories, 8 files

The Linux Experience doesn't end here. Explore more and unlock more commands.