Linux Commands Made Simple: Learn by Doing!


If you’ve ever opened a terminal and felt like you were staring into the Matrix then you’re not alone.
Learning Linux commands can seem overwhelming at first, especially when you're used to graphical interfaces. But trust me, once you get the hang of it, the terminal becomes one of the most powerful tools in your developer toolkit. Here's a list of basic Linux commands grouped by category.
File & Directory Management
Command | Description | Example |
pwd | show current working directory path | pwd |
ls | List files and directories | ls |
cd | Change directory | cd Documents/ cd Downloads |
mkdir | Create new directory | mkdir new_folder |
rmdir | Remove Empty directory | rmdir old_folder |
touch | Create new file | touch file.txt |
rm | Remove file | rm file.txt |
rm -r | Remove directory and contents | rm -r folder |
mv | Move or Rename files | mv old.txt new.txt |
cp | Copy files or folders | cp file.txt backup.txt or cp -r folder/ backup/ |
Viewing and Reading Files
Command | Description | Example |
cat | View entire file contents | cat file.txt |
head | View first few lines | head -n 5 file.txt |
tail | View last few lines | tail -n 5 file.txt |
less | View file with scroll support | less file.txt |
more | similar to less, paginated view | more file.txt |
Searching Files and Text
Command | Description | Example |
grep | Search for text in files | grep “root“ file.txt or grep “root” /folder/file.txt |
find | Find files in the directory | find . -name “*.txt“ |
find . -perm 777 | Shows files with all permissions(read,write, execute) | find . -perm 777 |
Compressing and Archiving
Command | Description | Example |
zip | Compress file or folder | zip -r archive.zip /folder |
unzip | Extract zip file | unzip archive.zip |
tar | Archive/Compress file | tar -czvf archive.tar.gz folder/ |
tar -x | Extract tar archive | tar -xzvf archive.tar.gz |
Environment and System Info
Command | Description | Example |
export | Set Environment Variable | export my_var=”Hello” |
echo | Display message or Variable | echo "$my_var |
env | List environment variables | env |
whoami | Show current user | whoami |
uname -a | Show system info | uname -a |
ps aux | Process which are running | ps aux |
sudo | Admin command | sudo |
df | Check the capacity and storage details | df |
du | Disk usage capacity | du |
top | What processes are running | top |
Conclusion
In this blog, we explored some of the most essential Linux commands, from creating files and directories to searching through files, compressing folders, changing permissions, and even downloading files directly from the terminal.
Hope you enjoyed reading this blog. Follow me for more such content 😊
#linuxcommands #learninginpublic #devops
Subscribe to my newsletter
Read articles from Sattyam Samania directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Sattyam Samania
Sattyam Samania
I am a Passionate Frontend Developer from India. I like to build attractive web pages. Here I will share my journey with all the other folks.