What is Linux?
Linux is an open-source operating system. It is based on the Linux kernel and this operating system is a typical package in a Linux distribution.
Here’s the list of common Linux commands with examples that might be a great cheat sheet for any developer:
cd linux command
The cd command is one of the most used Linux commands. The purpose of this command is to change the directory.
ls command
The ls command is also called as the list command which works in the Linux terminal to display all of the important folders or directories listed under a particular file system.
man command
This command is also known as the manual command. The man command is just a designed help system for Linux commands.
cat command
The cat Linux command is a short form of concatenate. This cat command is a Linux utility tool. Printing the contents of a file to the ordinary output sequence is an item of Edmond’s most incredible well-known applications.
mkdir command
This command is used to make a directory.
chmod command
The
chmod
command is used to set the file permission or a flag on a folder or a file.rmdir command
This command allows users to remove any file or directory from a particular location.
touch command
It’s used to make or create a file that doesn’t have any content.
locate command
The
locate
command is also called as the find command. This command is used to find or locate a particular file.clear command
As the name suggests, this command is used to clear the Linux window terminal.
rm command
Just like
rmdir
which removes the directory,rm
command is used to remove the particular file.mv command
This command enables a user to move a file to another directory.
curl command
The
curl
command is used to extract information from Uniform Resource Locators (URLs) or IP addresses. If it is not installed in your Linux environment then, first of all, you have to use apt-get command to install curl package.echo command
The
echo
command is used to print the specified text on the terminal window.free command
The
free
command is used to generate information about memory usage. It calculates for both the main Random Access Memory (RAM) and swap memory.groups command
The “groups” command displays a list of all the groups in the terminal, along with their information.
head command
The
head
command is used to display the first 10 lines of a particular file.history command
The
history
command is the most frequently used and one of the most important Linux commands. This command displays the list of the previously used commands. For using this command you just have to enter history.ping command
The
ping
command is the top command in the Linux environment. This command is always used to check the network connection or to troubleshoot networking issues.alias
The alias command tells the shell to return one string with a different string while performing the commands. When users frequently have to apply a single command many times, in those circumstances, they use something called an alias. Alias is like an alternative command that will have identical working as if they are addressing the entire command.
chown
The chown command enables users to modify the user and/or group control of an assigned file, directory, or representative link.
sudo
sudo is actually a “Super User DO” command in Linux. It is usually applied as a prefix to any command that the only superuser is permitted to execute.
ps command
The “ps” command can be used to display a list of running processes.
kill command
The “kill” command is used to terminate a process. It requires the process ID (PID) of the process to be killed. The PID can be obtained using the “ps” command.
df command
The “df” command displays information about disk space usage on file systems.
du command
The “du” command is used to estimate the disk space usage of a directory and its subdirectories. Adding the “-h” option provides a more readable output.
top command
The “top” command is commonly used to monitor system performance in real time. It displays information about CPU usage, memory usage, running processes, and more.
ifconfig command
The “ifconfig” command displays network interface information, including IP addresses assigned to the system.
free command
The “free” command displays information about the system’s memory usage, including total memory, used memory, free memory, and swap usage.
gzip command
The “gzip” command is used to compress files, creating a “.gz” file. To decompress a compressed file, you can use the “gunzip” command.