Top 50 Linux Commands You Must Know
2 min readJul 21, 2022
- ls β view contents of directory (list)
- pwd β path of the current directory
- cd β change directory
- mkdir β make new directory
- mv β move files / rename files
- cp β copy files
- rm β remove files
- touch β create blank new file
- rmdir β delete directory
- cat β list content of file to terminal
- clear β clear terminal window
- echo β move data into a file
- less β Shows fileβs contents one screen at a time
- man β show manual of Linux commands
- sudo β enables you to perform tasks that require administrative or root permissions
- top β task manager in terminal
- tar β used to archive multiple files into a tarball
- grep β used to searching words in specific files
- head β view first lines of any text file
- tail β view last lines of any text file
- diff β compares the contents of two files line by line
- kill β used for killing unresponsive program
- jobs β display all current jobs along with their statuses
- sort β is a command line utility for sorting lines of text files
- df β info about system disk
- du β check how much space a file or directory takes
- zip β to compress your files into a zip archive
- unzip β to extract the zipped files from a zip archive
- ssh β a secure encrypted connection between two hosts over and insecure network
- cal β shows calendar
- apt β command line tool for interaction with packaging system
- alias β custom shortcuts used to represent a command
- w β current user info
- whereis β used to locate the binary, source, manual page files
- whatis β used to get one-line man page description
- useradd β used to create a new user
- passwd β used to changing password of current user
- whoami β print current user
- uptime β print current time when machine starts
- free β print free disk space info
- history β print used commands history
- uname β print detailed information about your Linux system
- ping β to check connectivity status to a server
- chmod β to change permissions of files and directories
- chown β to change ownership of files and directories
- find β using find searches for files and directories
- locate β used to locate a file, just like the search command in Windows
- ifconfig β print ip address stuff
- ip a β similar to ifconfig but shortest print
- finger β gives you a short dump of info about a user