Do you think IIT Guwahati certified course can help you in your career?
No
Introduction
A utility of the Linux OS is the Linux Command. All primary and advanced tasks can be done by executing commands. The commands are performed on the Linux terminal. The terminal is a command line similar to the command prompt in Windows OS. Commands in Linux are case-sensitive.
It provides a powerful command-line interface compared to other OS like macOS and Windows. We can do basic and advanced work by using its terminal. We can do tasks such as creating, deleting, moving a file, etc. Also, we can do advanced tasks like administrative tasks (including package installation and user management), networking tasks (ssh connection), and many more.
Categories of Linux Commands
Linux Basic Commands
Commands for Working with Files
Commands for Working with Directories
Commands for Working with User Permissions
Commands for Working with Zipped Files
Working with Secure Shell For Remote Machine Access
Linux provides a CLI (Command Line Interface) to communicate with the OS. Here are the most used Linux Commands.
This command displays the current working directory.
Syntax:
pwd
mkdir Command
The above command is used to create a directory under any directory.
Syntax:
mkdir<directory name>
rmdir Command
The above command is used to delete a directory.
Syntax:
rmdir <directory name>
ls Command
The ls command displays a list of the content of a directory.
Syntax:
ls
cd Command
The above command is used to change the current directory.
Syntax:
cd <directory name>
touch Command
The above command is used to create empty files. We can create multiple empty files by running it only one time.
Syntax:
touch <file name>
touch <file1> <file2> ....
rm Command
The above command is used to remove a file.
Syntax:
rm <file name>
cp Command
The above command is used to copy a file or directory.
Syntax:
To copy in the same directory:
cp <existing file name> <new file name>
To copy in a different directory:
tac Command
The above command is the reverse of the cat command. It displays the content of a file in reverse order (bottom to top).
Syntax:
tac <file name>
more command
The above command displays the file content like the cat command. The difference is that, in the case of larger files, more command displays screenful output at a time.
Syntax:
more <file name>
id Command
The above command displays the user ID and group ID (GID)
Syntax:
id
cat Command
The above command is also used as a filter. To filter a file, it should be used inside pipes.
Syntax:
Enter file content To Save click Ctrl+D
cat <file name>
date Command
The above command displays the date, time, time zone, and more
Syntax:
date
cal Command
The above command is used to display the current month's calendar and date
Syntax:
cal
sleep Command
The above command holds the terminal for a specified amount of time. By default, it takes time in seconds.
Syntax:
sleep <time>
time Command
The above command is used to display the time.
Syntax:
time
exit Command
Linux above command is used to exit from the current shell.
After executing the command, the terminal will get excited.
Syntax:
exit
clear Command
Linux above command is used to clear the terminal screen.
Syntax:
clear
After this terminal’s screen will get cleared.
ip Command
Linux above command is an updated version of the ipconfig command. It is used to assign an IP address, initialize an interface, and disable an interface.
Syntax:
ip a or addr
ping Command
The above command checks the connectivity between two nodes and whether the server is connected.
Syntax:
ping <destination>
host Command
The above command returns the IP address of a given domain's name and vice versa.
Syntax:
host <domain name> or <ip address>
We have covered almost every Linux Utilities or command with their implementation
Frequently Asked Questions
How to write in a file in a Linux terminal?
In a Linux terminal, to write text in a file, use the >> and > operators.
How do you insert text in a file in Linux?
The >> to append text to the end of the file is used. It is also helpful to redirect and append/add lines to the end of files on Linux or Unix-like systems.
Is Linux a kernel or OS?
Linux is an open-source OS that is made of a kernel.
What kind of software is Linux?
Open-source operating system
Is Linux written in C or C++?
Linux is also written mainly in C, with some parts in an assembly. About 97 percent of the world's 500 most powerful supercomputers run the Linux kernel.
Conclusion
In this article, we have learned about some basic Linux utilities. We have discuss why to use it and how we can use it. We have discussed some very used commands. To learn more about Linux Utilities, check the link below: