what are the Linux Commands ? with examples.

what are the Linux Commands ? with examples.
what are the Linux Commands

Linux command is a utility of Linux operating system The commands are executed on the Linux terminal. Terminal is a command-line interface for interacting with the system, similar to the command prompt in Windows OS.

Linux terminal is a user-friendly terminal as it offers various support options.

What is Linux?

Linux is a free and open-source software that runs on its own operating system. The term ‘Linux’ stands for GNU + Linux. Initially developed by Linus Torvalds, it was created with the source code of Unix. While Linux is used extensively for a variety of purposes, its applications are familiar to many.

Using of Linux Commands

Linux command is a type of Unix command or shell process. They are the basic tools used to interact with Linux on a personal level. Linux commands are used to perform a variety of tasks, including displaying information about files and directories.
The Linux operating system is used on servers, desktops, and maybe even your smartphone. It has a lot of command line tools that can be used for almost everything on the system.
All users should be familiar with most of these commands as they are required for most operating system functions and computer programming.
Here we have put all the basic Linux commands that every Linux user (as a beginner) should know. This isn’t everything you need to know, but these are the basic and most commonly used commands.

1.pwd Command:

The pwd command is used to display the location of the current working directory

$ pwd

2.mkdir Command:

The mkdir command is used to create a new directory under any directory.

$mkdir

3.rmdir Command:

The rmdir command is used to delete a directory.

$ rmdir

4.ls Command:

The ls command is used to display a list of the contents of a directory.

$ ls

5.cd Command:

The cd command is used to change the current directory.

$ cd

6.touch Command:

The touch command is used to create empty files. We can create multiple empty files by executing it once.

$ touch

7.cat Command:

Cat command is a multi-purpose utility in Linux system. It can be used to create a file, display the contents of a file, copy the contents of one file to another and much more.

$ cat <file_name>

8.zcat Command:

The zcat command is used to display the compressed files.

$ zcat <file_name>

9.df Command:

The df command is used to display the disk space used in a file system. It displays the output as number of blocks used, available blocks and mounted directory.

$ df

10.mount Command:

The mount command is used to connect an external device file system to the system’s file system.

$ mount -t type

11.exit Command:

Linux exit command is used to exit the current shell. It takes a parameter as a number and exits the shell with the return of the position number.

$ exit

12.clear Command:

Linux clear command is used to clear the terminal screen.

$ clear

13.ip address Command:

The Linux ip command is an updated version of the ipconfig command. It is used to assign IP address, start interface, disable interface.

$ ip a

14.ssh Command:

Linux ssh command is used to create a remote connection through the ssh protocol.

$ ssh user_name@host(IP/Domain_name

15.ping Command:

The ping command is used to check the connectivity between two nodes,…

$ ping

Read Also-What is Dependency Track

The host command is used to display the IP address for a given domain name and vice versa. It performs the DNS lookups for the DNS Query.

$ host

17.od Command

The od command is used to display the contents of a file in various formats, such as hexadecimal, octal and ASCII characters.

$ od -b                 // Octal format
$ od -t x1            // Hexa decimal format
$ od -c                 // ASCII character format

18.sort Command:

The sort command is used to sort files in alphabetical order.

$ sort

19.gzip Command:

The gzip command is used to truncate the file size. It is a compressing tool. This replaces the original file with a compressed file with ‘.gz’ extension.

$ gzip

20.gunzip Command:

The gunzip command is used to decompress a file. It is a reverse operation of gzip command.

$ gunzip

21. find Command:

Find command is used to search for a particular file in a directory. It also supports various options to search a file like by name, by type, by date, and many more.

The following symbols are used after the find command:

(.) : For current directory name

(/) : For root

$ find . -name "*.pdf"

22.locate Command:

Locate command is used to find a file by file name. This is similar to the find command; The difference is that it is a background process. It searches the file in the database, while the find command searches the file system.

$ locate

23.date Command:

The date command is used to display date, time, time zone, and more.

$ date

24.Cal Command:

The cal command is used to display the current month’s calendar with the current date highlighted.

$ cal 

25.sleep Command:

The sleep command is used to hold the terminal by the specified amount of time. By default, it takes time in seconds.

$ sleep

26.time Command:

The time command is used to display the time to execute a command.

$ time

27.rm Command:

The rm command is used to remove a file.

Syntax:

$ rm <file name>

28.cp Command:

The cp command is used to copy a file or directory.

$ cp<exiting file name><new file name>

To copy in the same directory:

$ cp

To copy in a different directory:

29.mv Command:

The mv command is used to move a file or a directory form one location to another location.

$ mv<file name><directory path>

30.mail Command:

The mail command is used to send emails from the command line.

$ mail -s "subject"<recipient adress>
Hope you like this blog….
Mahesh Wabale
Latest posts by Mahesh Wabale (see all)

Leave a Comment