Linux is a powerful and diverse operating system, so naturally, the command line offers a wealth of power and functionality. If you’re starting on your journey toward Linux mastery, here are a few of the most commonly used commands that will carry you a long way.
File Operations
ls: Lists all files and directories in the present working directory. You can use flags like-lfor long listing,-ato show hidden files, and-hto show file size in human-readable format.cd: Changes the current directory. You can usecd ..to go one directory up,cd /to go to the root directory.pwd: Displays the present working directory. It shows the full path starting from the root directory.touch: Creates a new file. For example,touch newfile.txtwill create a new file namednewfile.txt.cp: Copies files from the source directory to the destination directory. For example,cp source.txt destination.txtwill copysource.txttodestination.txt.mv: Moves files between directories, or renames a file. For example,mv oldname.txt newname.txtwill renameoldname.txttonewname.txt.rm: Deletes a directory or a file. Be careful with this command, as the deleted files cannot be recovered. Use-rflag to remove directories.find: Searches for files and directories. For example,find /home -name myfile.txtwill search formyfile.txtin the/homedirectory.
Process Management: Linux Commands
ps: Displays your currently active processes. Useauxflags to view all running processes on the system.top: Displays all running processes and their usage of system resources like CPU and memory.kill: Kills a process. You need to know the PID (Process ID) of the process to kill it.bg: Sends a process to the background. This is useful if you have a process that you want to keep running while you do other things.fg: Brings a process to the foreground. If you have a process running in the background, you can bring it to the foreground with this command.
Also read | Best Laptops for Coding and Programming in 2025
File Permissions
chmod: Changes the permissions of a file or directory. Permissions are defined as a three-digit code, where each digit is an integer between 0-7.chown: Changes the owner and group of a file or directory. For example,chown user:group file.txtwill change the owner offile.txttouserand the group togroup.chgrp: Changes the group of a file or directory. For example,chgrp group file.txtwill change the group offile.txttogroup.
Networking
ping: Sends an ICMP echo request to establish a connection to server/IP. This is useful for troubleshooting network connectivity issues.netstat: Displays network statistics. This is useful for checking your network connections, and for troubleshooting.ssh: Secure Shell to get remote control of any Linux machine. For example,ssh user@hostnamewill start a SSH session withhostnameasuser.scp: Securely copies files between hosts on a network. For example,scp source.txt user@hostname:/pathwill copysource.txtto/pathonhostnameasuser.
Package Management
apt-get: APT package handling utility (Debian). You can useapt-get install packageto install a package,apt-get remove packageto remove a package.yum: Package manager (Red Hat). Similar toapt-get, you can useyum install packageto install a package,yum remove packageto remove a package.dnf: Next-generation package manager (Fedora). It’s the successor toyumand uses the same syntax.
Disk Usage
df: Shows disk usage. It displays the amount of disk space used and available on your filesystem.du: Estimates file and directory space usage. For example,du -sh /pathwill show the total disk usage of/pathin human-readable format.fdisk: Disk partition manipulator. It’s a powerful tool for creating, deleting, resizing, and managing disk partitions.dd: Converts and copies a file. It’s a low-level command that allows you to make exact copies of a file, convert data formats, and more.
Text Manipulation: Linux Commands
cat: Concatenates and displays file content. For example,cat file.txtwill display the content offile.txt.more: Views the contents of a file one screen at a time. This is useful for viewing large files.less: Opposite of the ‘more’ command. It allows backward navigation in the file as well as forward navigation.head: Displays the beginning of a file. For example,head -n 5 file.txtwill display the first 5 lines offile.txt.tail: Displays the end of a file. For example,tail -n 5 file.txtwill display the last 5 lines offile.txt.sort: Sorts the contents of a text file. For example,sort file.txtwill sort the lines infile.txt.cut: Removes sections from lines of files. For example,cut -d':' -f1 /etc/passwdwill display the first field of each line in/etc/passwd.wc: Counts lines, words, and characters in specified files. For example,wc -l file.txtwill count the number of lines infile.txt.
System Information
uname: Shows system information. For example,uname -awill display all system information, including machine name, kernel name, version, and more.uptime: Shows how long the system has been running. It displays the current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.hostname: Displays the system’s host-name. This is the name that the system is known by to other systems on the network.useradd: Creates a new user. For example,useradd johnwill create a new user namedjohn.userdel: Deletes a user account. For example,userdel johnwill delete the userjohnand his home directory.su: Switches the user ID to another user. For example,su johnwill switch the current session’s user tojohn.sudo: Executes commands as another user. For example,sudo apt-get updatewill run theapt-get updatecommand with root privileges.passwd: Changes the user password. For example,passwd johnwill change the password for the userjohn.
Compression / Decompression
tar: Stores and extracts files from a tape or disk archive. For example,tar -cvf archive.tar file1 file2will create an archive namedarchive.tarfromfile1andfile2.gzip: Compresses or decompresses named files. For example,gzip file.txtwill compressfile.txttofile.txt.gz.gunzip: Decompresses files. For example,gunzip file.txt.gzwill decompressfile.txt.gztofile.txt.zip: Package and compress files. For example,zip archive.zip file1 file2will create a compressed archive namedarchive.zipfromfile1andfile2.unzip: Extract files from a ZIP archive. For example,unzip archive.zipwill extract all files fromarchive.zip.
Searching
grep: Searches the input files for a pattern. For example,grep 'pattern' file.txtwill search forpatterninfile.txt.locate: Finds files by name. For example,locate file.txtwill find all instances offile.txtin the system.
Also read | Google Announces Android XR OS for XR Devices
These top 50 Linux commands provide a solid foundation for efficiently navigating and managing your Linux system. Experiment with them in your terminal to gain confidence and proficiency, gradually unlocking the full potential of the command line.

