Top 60 Linux Commands Cheat Sheet
Top 60 Linux Commands Cheat Sheet
Top 60 Linux Commands Cheat Sheet
Welcome to your comprehensive guide to mastering Linux commands. Linux is a powerful operating system, and its command-line interface (CLI) is a cornerstone of its versatility. This cheat sheet highlights 60 essential commands that can make managing Linux systems much easier.
A. File and Directory Management Commands
ssh- Secure Shell, used for secure remote access to a system.ls- List directory contents.pwd- Print the current working directory.cd- Change directory to a different folder.touch- Create an empty file or update the modified timestamp of an existing file.echo- Print a message or the value of a variable.nano- A simple text editor.vim- A more advanced text editor with many features.cat- Print the contents of a file to the console.shred- Securely delete a file by overwriting its contents.mkdir- Create a new directory.cp- Copy a file from one location to another.mv- Move a file from one location to another or rename a file.rm- Remove a file.rmdir- Remove a directory if it is empty.ln- Create a link to a file or directory.head- Display the first lines of a file.tail- Display the last lines of a file.cmp- Compare two files byte by byte.diff- Display the differences between two files.sort- Sort the lines of a file.find- Search for files in a directory hierarchy.chmod- Change the permissions of a file or directory.chown- Change the owner of a file or directory.
B. System Management Commands
clear- Clear the console.useradd- Add a new user to the system.adduser- Add a new user to the system with more options thanuseradd.sudo- Run a command with administrative privileges.su- Switch to another user account.exit- Close the current terminal or log out of the current user account.sudo passwd- Change the password for the current user.sudo passwd [username]- Change the password for another user.sudo apt- A package manager used to install, update, and remove software packages on Debian-based systems.sudo apt update & install- Update package lists and install packages.finger- Display information about a user.man- Display the manual page of a command.whatis- Display a brief description of a command.which- Locate a command and display its path.whereis- Locate the binary, source, and manual page files for a command.
C. File Comparison & Manipulation Commands
wget- Download files from the web.curl- Transfer data to or from a server.zip- Compress files into a zip archive.unzip- Extract files from a zip archive.
D. Networking Management & Monitoring Commands
ifconfig- Configure network interfaces.ip address- Display IP address information.ping- Test network connectivity by sending packets to a host.netstat- Display network connections, routing tables, and interface statistics.ss- Display socket statistics.iptables- Configure and administer the Netfilter firewall.ufw- A user-friendly interface to manage iptables firewall rules.
E. System Information & Process Management Commands
uname- Print system information, including kernel name, network node hostname, kernel release, and kernel version.neofetch- Display system information in a colorful and visually appealing way.cal- Display a calendar of the current month or year.free- Display the amount of free and used system memory.dfanddf -H- Display disk usage statistics for a file system.ps- Report a snapshot of current processes.top- Display dynamic real-time information about running processes.kill- Send a signal to terminate a process.pkill- Send a signal to terminate one or more processes based on their name.systemctl- Control the system and service manager.history- Display previously executed commands.sudo reboot- Reboot the system with administrative privileges.shutdown- Shutdown or reboot the system.
This cheat sheet is a fantastic reference for both new and experienced Linux users. Keep it handy as you navigate the Linux CLI, and you’ll find your efficiency and confidence growing with every command mastered!
This post is licensed under
CC BY 4.0
by the author.