While some users might find using Linux difficult, learning some basic and essential Linux commands and understanding their use can turn out to be very helpful.
This article aims to provide you with a cheat sheet of commonly used and essential Linux commands.
What is Linux OS?
Linux is a family of operating systems developed by Linus Torvalds and it was released on September 17, 1991. It is a Unix-like, open-source operating system. Some of the most common Linux distributions include Ubuntu, Debian, Kali Linux, and Fedora.
In addition to desktops and servers, Linux also offers versions for mobile phones, laptops, and embedded devices.
Essential Linux Commands
We highlight essential Linux commands that are useful even for beginners. Additionally, we’ve arranged the commands by their intended purpose and explained how to use them.
File Management Commands
Firstly, we’ll highlight the commands that are essential for file management.
ls | To list all the files and directories present in the current directory |
cd | The change directory is used to navigate between the directories |
mkdir | The make directory command allows the user to create a new folder |
rm | To remove a file or directory |
cp | To copy files and directories |
chmod | To change mode/permissions of a file or directory |
touch | To create a new file/directory |
chown | To change the owner of a file or directory |
mv | To move files from one location to the other |
Text Management Commands
Here, we’ve curated some essential commands for editing and organizing text files.
cat | To read the text files and their output |
grep | To search through text in files |
sed | A stream editor used to edit files |
awk | To extract and scan text in files |
cut | Scans and extracts text from a line |
sort | To organize text in files |
uniq | To arrange data by removing duplicates |
wc | To count the number words, lines, and bytes in files |
System Management Commands
Furthermore, we’ll discuss the commands that are essential for basic system management in Linux.
uname | To display the system’s information including username, operating system, etc |
df | To display the amount of disc space free or available |
top | To manage/monitor the system processes and performance |
free | To display the amount of memory free and used in the system |
uptime | To display the current running time of the system |
who | Shows that who is currently logged into the system |
w | To display the list of users currently logged into the system along with their details |
Network Management Commands
Now, we’ll briefly discuss the commands that aid in managing the system’s network.
ping | To check the network connectivity between the two devices |
ip | To check the IP address of the device |
ss | Used in troubleshooting and detecting malicious activities |
if config | To display the parameters of the network |
traceroute | To troubleshoot network routing issues by tracing the path |
Process Management Commands
Adding to the list, let’s list some of the process management commands.
kill | To kill/terminate the processes |
ps | To monitor the process status running in the system |
jobs | To display the current processes |
bg | To resume a previous job |
fg | To bring the background job to the foreground and directly interact with it |
nice | To run a command at a lesser priority than the normal priority |
renice | To change the priority of a process that is already running |
Disk Management Commands
Furthermore, we’ll discuss some disk management commands that allow the user to manage the hard disk and its tasks.
fdisk | Used for partitioning a hard disk in the system |
mkfs | To make a file system or storage device on the system |
mount | To mount and add a file system |
umount | To unmount an already added file system |
dd | To convert and copy data |
User Management Commands
Lastly, we’ll discuss the commands that allow user management within the system. The user management includes the password and username controls.
passwd | To change the password of the system’s user |
useradd | To add/create a new user |
groupadd | To create a new group |
groupmod | To modify an existing group |
usermod | To modify an existing user of the machine |
Conclusion
To sum up, this article has highlighted all the essential and daily use Linux commands and their purposes. The aforementioned commands are essential for a beginner-level user. While it may be difficult to learn all of them at once, the more you use these commands, the easier it becomes to remember them. Moreover, you can bookmark this article to revisit it whenever you need to check the purpose of any command.
I’m currently pursuing my Bachelor’s degree. Alongside my studies, I specialize in jotting down my knowledge about Linux by effectively and practically using my hobby of writing.