Basic Linux Commands: Though Linux is not a famous and most used operating system by conventional users, Linux offers a lot of interesting things compared to other operating systems like Windows, Mac OS and more. Firstly, Linux is an Open source Operating system and hence one can able to use it for free. Linux Operating systems more designed for Server Side initially but currently, Linux is available as a Full featured Operating system. The most famous Linux Distributions as Redhat, Ubuntu, KDE, SUSE, Mint and more. Though Command Prompt is available in Windows OS, people generally don’t use it much as they mostly rely on the Full Fledged GUI offered by Windows. In contrast, Linux was initially based on Terminal and hence Linux Codes are much familiar than Windows Codes among the users. Later on, Linux also started providing a better and easily usable Graphical User Interface(GUI). In this article, we will cover all the Basic Linux Commands that you will be looking for as a beginner of Linux OS.
Getting Started with Linux Terminal:
Firstly, Let’s start with opening the Linux Terminal. You can use CTRL+ALT+T to open Linux Terminal. You can also open the Linux Terminal in GUI mode. It will be available under All Applications.
Once the Terminal is opened, it will be ready for use. By default, the terminal will specify the Computer name as well as the Username. Refer the following image for better understanding. The format is [email protected]:~$
- Username: The username of the Current user.
- Hostname: Hostname of the Server.
- ~ Bash[Default Shell]. Represents the Current Directory.
- $ End of the Command Prompt after which user can enter their input.
- The above are the Terminologies of Linux Shell Codes that appear the moment the Terminal is opened.
Basic Linux Commands and Working with Linux Terminal:
In this section, we will list out all the basic Linux Commands and codes that you can use on your Linux Terminal to perform various operations. Kindly Ignore the $ sign while copying command from here.
Clear command is used to clear the Linux Terminal. It will create all the existing entries that appear the Linux terminal and provides a Fresh interface. Kindly note that using “Clear” Command will not kill or terminate the process that is currently going on in Linux Terminal. Kindly Ignore the $ sign while copying command from here.
Exit Command is used to close the Linux Terminal. If you are done with your work on Terminal and if you wish to close the Terminal then you use the Exit Command. In case your terminal is running a process and if you try to close the Terminal, then a Warning popup will appear stating that “Closing the Terminal will kill the process.”
The bg Command is used to send a process that is going on to the background and hence you can start a new process while the older process will be running in the background.
cal command is used to display the Calender on the Terminal.
date command is used to display the system Date and time on the terminal. You can also set the date using this command.
dir command will display all the folders of the current user who is logged in.
du command will show the Disk space usage of the directory as well as the subdirectories.
The echo command is used to print text in the terminal. If you want to print information or reference or any kind of texts then you can use the echo command.
free command is used to display the free disk space. It shows all the information on the disk such as Free Space, Used Space, Swap memory, Cache memory and more in a clear format.
history command will display the previous commands used on the Terminal.
hostname command will display the Hostname of the server.
last command is used to display the information about the last user who logged in.
ls command will list the contents in the directory and it is similar dir command.
lscpu command will provide complete information about CPU such as Processor name, processor working frequency, Cache information and more.
nano Command will open a small and simple Text editor inside the Linux Terminal itself where you can perform a number of operations such as write, read, edit, search and finally save the file.
passwd command is used to manage your password in your Linux system. If you wish to change the current password of your system on terminal then use can use passwd command.
pwd will display the current working directory.
rm command is used to remove a file from the directory.
rmdir command is used to remove a folder in a directory.
shutdown command is used to Shutdown the PC. Pc will be set to Automatic shutdown for the Next minute from the time the command executed. If you wish to cancel the shutdown, kindly use shutdown -c
top command displays information about the processes(CPU usage, total tasks, Memory, Swap, Cache and information on individual tasks that are running currently and more) that are currently running on the Linux OS. To make it more clear, this command provides information just like the Task Manager of Windows provides.
uptime command shows information about the Operating system.
users command display the information about the user who is logged in currently.
wget command is used to download files from the internet by specifying the exact path.
w command will show the information about the current user, load averages and time active and more.
Get in touch with Us:
The above are the basic and frequently used Linux commands that we have to know as a beginner. This article described most of the Basic Linux Commands with clear image representation and if you have any query then kindly Comment us and we will get back to you with a solution ASAP.