![50+ Linux Commands with Screenshots](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/50-Linux-Commands-with-Screenshots.jpg)
Introduction
Without a doubt, Linux is very prevalent and famous for its powerful Linux commands. In order to employ Linux effectively, all users must be aware of how to utilize terminal commands. Although the Linux commands operating system has a GUI (Graphical User Interface), you can discover that various functionalities operate faster when they are operated as commands via the terminal. Thus, under this guide, we have provided insights into the most basic commands of Linux one must know while working on the Linux-based system. Plunge into the segments below and acquire all the details.
Linux Commands: Basic
![Linux Commands: Basic](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/Basic-Linux-Commands-you-Must-Know-1.jpg)
Before you learn about the basic commands in Linux, you must ensure to meet the prerequisites –
- A system that operates Linux
- Accessibility to the command line or terminal
Moreover, all the commands of Linux can fall into one of the following four classifications:
- Shell builtins – These include commands that are constructed directly into the shell with the fastest execution.
- Shell functions – These include shell scripts that are basically grouped commands.
- Aliases – They incorporate custom command shortcuts.
- Executable programs – These include compiled and installed programs or scripts.
Basic Linux Commands you Must Know
![](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/Linux-Commands-Basic.jpg)
1. ls
It lists the files and directories in the current directory.
Syntax: ls [options] [directory]
![ls command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-113.png)
2. cd
Changes the current directory.
Syntax: cd [directory]
![cd command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-61.png)
3. pwd
Shows the current working directory.
Syntax: pwd
![pwd command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-63.png)
4. Mkdir
Creates a new directory.
Syntax: mkdir [directory]
![Mkdir command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-62.png)
5. rmdir
Deletes an empty directory.
Syntax: rmdir [directory]
![rmdir command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-68.png)
6. rm
Deletes a file or directory.
Syntax: rm [file/directory]
![rm command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-66.png)
7. cp
Copies a file or directory.
Syntax: cp [options] [source] [destination]
![cp command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-69.png)
8. mv
Moves or renames a file or directory.
Syntax: mv [options] [source] [destination]
![mv command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-65.png)
9. touch
Creates a new empty file.
Syntax: touch [filename]
![touch command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-67.png)
10. cat
Displays the contents of a file.
Syntax: cat [filename]
![cat command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-64.png)
11. less
Displays the contents of a file one screen at a time.
Syntax: less [filename]
![less command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-74.png)
12. head
Displays the first few lines of a file.
Syntax: head [filename]
![head command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-70.png)
13. tail
Displays the last few lines of a file.
Syntax: tail [filename]
![tail command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-77.png)
14. grep
Searches for a pattern in a file.
![grep command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/unnamed.png)
Syntax: grep [options] [pattern] [filename]
15. find
Searches for files in a directory hierarchy.
Syntax: find [directory] [options] [expression]
![find command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-79.png)
16. tar
Creates or extracts a compressed archive.
Syntax: tar [options] [archive-filename] [files/directories]
![tar command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-71.png)
17. gzip
Compresses a file.
Syntax: gzip [filename]
![gzip command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-80.png)
18. gunzip
Decompresses a compressed file.
Syntax: gunzip [filename]
![gunzip command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-72.png)
19. bzip2
Compresses a file.
Syntax: bzip2 [filename]
![bzip2 commnad](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-78.png)
20. bunzip2
Decompresses a compressed file.
Syntax: bunzip2 [filename]
![bunzip2 command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-86.png)
du
Shows the disk usage of files and directories.
Syntax: du [options] [directory]
![du command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-121.png)
df
Shows the disk space usage of filesystems.
Syntax: df [options]
![df command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-85.png)
top
Displays the current system status.
Syntax: top
![top command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-83.png)
ps
Lists the currently running processes.
Syntax: ps [options]
![ps command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-97.png)
kill
Sends a signal to a process to terminate it.
Syntax: kill [options] [PID]
![kill command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-105.png)
ping
Tests the network connectivity to a host.
Syntax: ping [options] [hostname/IP address]
![ping command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-115.png)
ifconfig
Configures network interfaces.
Syntax: ifconfig [options] [interface]
![ifconfig command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-88.png)
netstat
Shows network connections, routing tables, and network statistics.
Syntax: netstat [options]
![netstat command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-89.png)
ssh
Connects to a remote host using SSH.
Syntax: ssh [user@]hostname [command]
![ssh command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-125.png)
scp
Copies files securely between hosts using SSH.
Syntax: scp [options] [source] [destination]
![scp command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-101.png)
ftp
Transfers files between hosts using FTP.
Syntax: ftp [options] [hostname]
![ftp command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-84.png)
chmod
Changes the permissions of files and directories.
Syntax: chmod [options] [mode] [file/directory]
![chmod command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-85.png)
chown
Changes the owner of files and directories.
Syntax: chown [options] [owner:group] [file/directory]
![chown command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-76.png)
passwd
Changes the password of the current user.
Syntax: passwd [options] [username]
![passwd command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-93.png)
su
Switches to another user account.
Syntax: su [options] [username]
![su command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-98.png)
sudo
Executes a command with superuser privileges.
Syntax: sudo [options] [command]
uname
Shows system information.
Syntax: uname [options]
![uname command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-82.png)
date
Shows the current date and time.
Syntax: date [options]
![date command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-99.png)
cal
Shows the calendar for the current month.
Syntax: cal [options]
![cal command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-106.png)
uptime
Shows the system uptime and load average.
Syntax: uptime [options]
![uptime command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-117.png)
free
Shows the memory usage.
![free command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-110.png)
Syntax: free [options]
Also Read: How Can I Check Memory Usage in Linux?
top
Shows the system resource usage.
Syntax: top [options]
![top command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-95.png)
history
Shows the command history.
Syntax: history [options]
![history command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-81.png)
tar
Compresses or extracts files from an archive.
Syntax: tar [options] [archive-filename] [files/directories]
![tar command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-116.png)
![tar command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-107.png)
ssh-keygen
Generates SSH keys for authentication.
Syntax: ssh-keygen [options] [keyfile]
![ssh-keygen command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-124.png)
crontab
Schedules commands to run at specified times.
Syntax: crontab [options] [filename]
![crontab command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-109.png)
systemctl
Controls the system and service manager.
Syntax: systemctl [options] [command]
![systemctl command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-111.png)
ping6
Tests the network connectivity to a host using IPv6.
Syntax: ping6 [options] [hostname/IP address]
traceroute
Shows the network path to a host.
Syntax: traceroute [options] [hostname/IP address]
![traceroute command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-123.png)
sed
A stream editor for modifying files.
Syntax: sed [options] [script] [filename]
![sed command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-120.png)
awk
A versatile tool for working with text files.
Syntax: awk [options] [script] [filename]
![awk command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-103.png)
cut
Cuts out sections from a file.
Syntax: cut [options] [filename]
![cut command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-87.png)
paste
Combines lines from multiple files.
Syntax: paste [options] [filename1] [filename2]
![paste command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-91.png)
sort
Sorts lines of text.
Syntax: sort [options] [filename]
![sort command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-92.png)
![sort command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-122.png)
uniq
Removes duplicate lines from a file.
Syntax: uniq [options] [filename]
![uniq command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-108.png)
diff
Compares two files and shows the differences.
Syntax: diff [options] [file1] [file2]
![diff command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-118.png)
patch
Applies a patch file to a file.
Syntax: patch [options] [original-file] [patch-file]
![patch command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-90.png)
tar
Archives files and directories into a single file.
Syntax: tar [options] [archive-filename] [files/directories]
![tar command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-112.png)
zip
Compresses files into a zip archive.
Syntax: zip [options] [zip-filename] [files/directories]
![zip command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-104.png)
![zip command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-75.png)
Also Read: How to Zip a File in Linux?
unzip
Extracts files from a zip archive.
Syntax: unzip [options] [zip-filename]
![unzip command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-119.png)
curl
Transfers data from or to a server.
Syntax: curl [options] [url]
![curl command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-94.png)
wget
Downloads files from the web.
Syntax: wget [options] [url]
wget -N http://files.virtualizor.com/install.sh
![wget command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/unnamed-1.png)
scp
Copies files between hosts securely.
Syntax: scp [options] [source] [destination]
![scp command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-102.png)
rsync
Syncs files and directories between hosts.
Syntax: rsync [options] [source] [destination]
![rsync command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-96.png)
mount
Mounts a filesystem.
Syntax: mount [options] [device] [mountpoint]
![mount command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-126.png)
umount
Unmounts a filesystem.
Syntax: umount [options] [mountpoint]
![umount command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-100.png)
killall
Sends a signal to all processes with a given name.
Syntax: killall [options] [process name]
ps aux
Shows all running processes.
Syntax: ps aux
![ps aux command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-114.png)
who
Shows all logged-in users.
Syntax: who
![who command](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/image-73.png)
Linux Commands Cheat Sheet
Above you have learned 50+ Linux Commands. Here, we have integrated all those commands in a cheat sheet which you may download and save. Whenever you need to find any of the above-mentioned Linux commands you can go through this cheat sheet.
![Linux Commands Cheat Sheet](https://www.hostbillo.com/blog/wp-content/uploads/2023/09/Screenshot-21-266x300.png)
Conclusion
After going through the above section thoroughly, you must have learned about some crucial Linux commands. This guide has highlighted a list of standard Linux commands and their brief explanations. However, you must note that there are many more commands available in Linux, and their usage may vary depending on the distribution you’re using.