Essential Linux Commands for Beginners (With Examples)
The Linux terminal looks intimidating at first, but with about twenty commands you can do practically everything you need day to day. Here are the most important ones with practical examples.
Navigating the File System
pwd— shows which folder you are in right now (print working directory)ls— lists files and folders in the current directoryls -la— lists everything including hidden files and permissionscd /path/folder— navigate to a foldercd ..— go up one level in the folder treecd ~— go to your home folder
Managing Files and Folders
mkdir name— create a new foldertouch file.txt— create an empty filecp source destination— copy a filecp -r folder/ destination/— copy an entire foldermv source destination— move or rename a filerm file.txt— delete a file (NO trash, be careful)rm -rf folder/— delete a folder and all its contents (be very careful)
Viewing and Editing Files
cat file.txt— show the contents of a fileless file.txt— show contents paginated (q to exit)nano file.txt— edit a file with the nano editor (easiest)grep 'text' file.txt— search for text inside a file
Permissions and Users
sudo command— run a command as administrator (superuser)chmod +x script.sh— give execute permissions to a filechown user file— change the owner of a filewhoami— show your current username
Processes and System
ps aux— list all running processestoporhtop— real-time process monitorkill PID— close a process by its IDdf -h— show available disk spacefree -h— show available RAM
Networking
ping google.com— check internet connectioncurl https://example.com— download content from a URLwget https://example.com/file.zip— download a fileifconfigorip addr— show network configuration
Installing Programs (Ubuntu/Debian)
sudo apt update— update the list of available packagessudo apt install program-name— install a programsudo apt remove program-name— uninstall a programsudo apt upgrade— update all installed programs
What is the first Linux command I should learn?
Start with ls (list files), cd (navigate folders) and pwd (see where you are). With these three commands you can already move around any Linux system confidently. They are the foundation of everything else.
How do I avoid accidentally deleting important files in Linux?
The rm command in Linux has NO trash: files are permanently deleted. To avoid mistakes: (1) use rm -i (asks for confirmation before deleting), (2) install trash-cli which sends to a real trash bin, (3) never use rm -rf / which deletes the entire system.
What is sudo in Linux and when should I use it?
sudo (super user do) lets you run commands with administrator permissions. Use it only when the system requires it or when installing/configuring system software. Do not use it for normal tasks — for security, always work as a regular user.
Conclusion
These commands cover 95% of what you will need as a Linux user. The trick to learning the terminal is to use it: instead of using the file explorer, navigate with cd and ls. After a couple of weeks it will feel completely natural.





