System administrators oversee configuring, maintaining, and ensuring dependable computer functioning, particularly in multi-user PCs (e.g., servers). A successful system administrator provides. This post will go over some basic Linux commands that any system administrator should be familiar with. If you’re already a system administrator, you’re probably familiar with these commands. If you’re interested in system administration, studying these commands can help you gain a better understanding of the subject.
A typical Linux user is familiar with practically all of the fundamental Linux day-to-day commands for tasks such as installing applications, transferring data from one directory to another, and so on. However, in this post, I’ll present 100 key Linux commands that will be valuable to all Linux users, from newbies to experienced Linux developers and system administrators. So, without spending any more time, let’s get started with this massive list of Linux commands.
You’ll spend a lot of time working on the Linux terminal when you switch from Windows or Mac to Linux. The terminal is a computer console that receives user commands and performs a job on the system. Any Linux user who wants to administrate their system effectively has to be able to run commands on the terminal. Although Linux comes with a plethora of commands, we’ll keep things simple in this introduction and focus on the most important Linux commands to know as you get started. So to see the working of these below mentioned commands you need to open the terminal and type the following command.
In this article we will provide you the basic functionality of each command and if you are interested in exploring more then you can also do that from its help.
List of commands
1. Apt update
This is one of the most used command that used to get the latest information from all the application regarding their upgradation. This command will show you how many applications are there that can be upgrade to their latest version by typing.
2. Apt upgrade
As stated earlier that the update command is used to fetch the latest information about the application that can be upgrade. But other than that it can’t do any thing so to upgrade all those applications you need to use the upgrade command and you can do that by typing.
You’re on a certain directory path on the terminal at any given time. Run the pwd command to reveal the path you’re working on. The pwd command, which stands for Print Working Directory, is a simple Linux function that displays or prints the entire path to the directory you’re in.
There are multiple users available on Linux mint, so if you are interested on finding the user that is currently login to the system then you can do that by typing whoami command as shown below.
Now as you checked the directory from the previously shown command and if you are interested to view the available content on that directory then you can do that by using the ls command as shown below.
This command works exactly same as the ls command, but the major difference is that it provides you more details of the directories and subdirectories in a tree type format. You can also get the information of total no of directories and files available in the specific location.
Change directory or cd command is used to change the directory and switch to another directory that you desire as the name suggests.
Its general syntax is
Mkdir stand for make directory that is used to create a new directory in your desired path. For example, in our case we are creating a new directory with a name of “linuxmint” in the home directory as shown below.
Later you can verify the newly created directory with the ls command that we already discussed above.
rmdir is basically used to delete or remove any directory from the specified location. If you have created any duplicate folder or a folder that is no longer need then you can remove that by using this command by following the general syntax mentioned below.
In our case it can be
Touch command is used to create a text file in any specified location of your choice. Its general syntax is
For example in our case it can be.
If you have created any irrelevant, duplicate files or want to delete some files to make some space then you can do that by typing the rm command by following its general syntax.
For example, we are going to delete the same file that we have created earlier by using a touch command and for that you can type.
Cal is basically a calendar that is used to show you the no of days and dates for the whole month that you are currently in. for that you need to type cal in the terminal and it will show you the calendar for the whole month as shown below.
Basic calculator or bc is used to provide you the functionality of the basic calculator. By opening it in a terminal, you can perform basic arithmetic operations from division to subtraction as shown below.
Disk free or df command is used to provide all the system information with the mounted devices as shown below. You simply need to type df in the terminal to get this information.
This is one of the most useful command that can help you in finding the syntax or usage of all the available command on linux mint. For that you simply need to write help in the terminal and it will displays all the available commands as shown below.
Its full form is manual which is used to display the detailed information of any command that you are looking for.
This command is used to rename any file that is available on your system and you can follow its general syntax by typing.
$mv file_name new_name
For example in our case we can type.
$mv Testfile.txt Newtestfile.txt
If you are facing any problem with your internet connection or not able to open any specific website then you can use the ping command to see if it is reachable or not.
You can follow its general syntax as.
For example, you can test google.com and for that you need to type.
The uptime command tells you how long the system has been up and operating since it was turned on. It displays the current time and the length of time it has been operating in the day without any command options: hour: minimum format, number of logged-in users, and average load as shown below
The top command is a useful tool for monitoring system resources and operations in real time. It displays a plethora of information about the presently running processes, including uptime statistics, CPU, and memory consumption.
This command provides you all the used, free and share space available in your system. To get this information you need to type free in the terminal as shown below
This command prints any text on the terminal, which implies that if you’re writing a lot of different commands in the terminal, this command will help you distinguish between them so you don’t get confused by following its general syntax as shown below.
$echo “Welcome to Linux Mint”
This command is super useful if you have written various commands in the terminal and then you like to clear everything from the terminal and start over again.
This is one of the simplest ways to restart your system without using a graphical user interface. If you have updated your applications or your system is not working properly due to any reason then you can restart your system by using a reboot command in the terminal as shown below.
This command can show you all the commands that you have previously written in the terminal that can also be called as the history of your activities, for that you need to type.
The last command provides useful information regarding system user behavior. This command is accessible to ordinary users. The final command displays data such as the current time, date, kernel version, system boot/reboot, and so forth. This data is very valuable for troubleshooting.
This command is useful to copy the content of a file from one path to another path. If you are planning to make some changes in any of the system file, then it is highly recommended to make a duplicate file first to avoid yourself from the problems that you can face later.
$cp path_to_source_directory path_to_destination_directory
This command is used to read the content of text file that is stored inside it by typing.
If there are large no of directories or file and if you are looking for a specific one then you can do that by using this command by typing
$ grep -c 'linux mint' testfile.txt
You can stop any process that is presently running in the background that you believe should not be there or that you do not require by writing.
$sudo kill process
You can get the details of all the processes that are running in the background by typing.
So, if you want to kill the process with number 1154 then you need to type.
$sudo kill 1154
We’ve covered some of the most helpful 30 commands in this article, which will help you not only save time but also complete your task more efficiently. The commands listed above are some of the most fundamental Linux commands that each Linux user should be familiar with. Mastering these commands would be a great place to start your training if you are a system administrator or want to be one eventually. It’s worth noting that practically all of the commands mentioned above have additional capabilities than those given in this article.