Welcome! This page is your friendly guide to the most useful Linux commands. Each command comes with a simple explanation and a real-world example. Don't worry if you're new, just try these out and you'll feel like a pro in no time!
pwd
Show your current location (Print Working Directory).
ls -l
See a detailed list of files and folders in your current location.
cd /path/to/dir
Move into a different folder. Try cd ~ to go home!
ls -a
Show all files, including hidden ones (those starting with a dot).
mkdir myfolder
Make a new folder called myfolder.
touch file.txt
Create a new empty file named file.txt.
cp file1.txt file2.txt
Copy file1.txt to file2.txt.
cp -r dir1 dir2
Copy a whole folder and its contents.
mv old.txt new.txt
Rename or move a file or folder.
rm file.txt
Delete a file. Be careful!
rm -r myfolder
Delete a folder and everything inside it.
rmdir myfolder
Remove an empty folder.
cat file.txt
Show the contents of a file.
less file.txt
View a file page by page. Press q to quit.
head file.txt
See the first 10 lines of a file.
tail file.txt
See the last 10 lines of a file.
nano file.txt
Edit a file in Nano (easy for beginners).
vim file.txt
Edit a file in Vim (for advanced users).
whoami
Show your current username.
date
Display the current date and time.
df -h
See disk space usage (human-readable).
free -h
See memory (RAM) usage (human-readable).
man ls
Read the manual for ls (works for most commands).
ls --help
See quick help for any command (try --help with others too!).