Top 20 Basic Linux commands Linux commands:

Hello guys, you might have read many articles about popular Linux commands on the internet but this article is a bit different. In this article, I am going to share some lesser-known options of essential Linux commands like find, grep, mkdir, etc, which many Linux users, including programmers, don’t know, even after using the command for quite some time.

Sure! Here are 20 commonly used Linux commands:

The syntax for the ls command is as follows:

  • ls: List files and directories in the current directory
  • When used with no options and arguments, ls displays a list of the names of all files in the

The syntax for the cd command is as follows:

cd: Change the current directory.

The syntax for the pwd  command is as follows:

  • pwd: Print the current working directory.

The syntax for the mkdir command is as follows:

The mkdir command allows you to create directories from within the terminal. The default syntax is mkdir followed by the directory name.

The syntax for the rmdir command is as follows:

rmdir command is similar to the rm command, but rmdir only removes empty directories. So first, we will use the help flag to list down all the available options for the rmdir command:

The syntax for the cp command is as follows:

The cp command is the primary method for copying files and directories in Linux. Virtually all Linux distributions can use

The syntax for the mv command is as follows:

The mv command is one of the basic Linux commands that is used to move the files and directories from one location to another. It is also used to rename the files and directories. The mv command is available on all Linux distributions by default.

The syntax for the touch command is as follows:

The touch command is a standard command used in UNIX/Linux operating system which is used to create, change and modify timestamps of a file. Basically, there are two different commands to create a file in the Linux system which is as follows:

touch linux
The syntax for the cat command is as follows:

Cat in Linux stands for concatenation (to merge things together) and is one of the most useful and versatile Linux commands. While not exactly as cute and cuddly as a real cat, the Linux cat command can be used to support a number of operations utilizing strings, files, and output.

The syntax for the grep command is as follows:

Grep command in Unix/Linux is the short form of ‘global search for the regular expression’.

The grep command is a filter that is used to search for lines matching a specified pattern and print the matching lines to standard output.

The syntax for the cat command is as follows:

Using the “cat” command, you can create a file, view the file content, concatenate the files, and redirect the file output. The syntax of this command as follows:

The syntax for the find command is as follows:

The find command allows you to search for a specific string of characters using your Linux command-line interface. It is a highly practical tool as it is not limited to file names. You can use it to search a specific location, add options to control the behavior of the search, and use additional commands to tell it how to manage the data it finds.

find linux
The syntax for the chmod command is as follows:

The chmod (change mode) command in Linux is used to change the access mode of a file, based on the type of user accessing the file and the type of permission associated with accessing the file.

chmod linux

The syntax for the tar command is as follows:

The tar command in Linux is one of the most essential commands when it comes to file management. It is short for Tape Archive and is used to create and extract archive files. An archive file is a compressed file that contains one or more files bundled together for more accessible storage and portability. In this guide, we’ll demonstrate, through examples, how to create, list, edit, and extract tar archive files, and cover some of the more commonly used tar command options.

tar linux

The syntax for the man command is as follows:

man command in Linux is used to display the user manual of any command that we can run on the terminal. It provides a detailed view of the command which includes NAME, SYNOPSIS, DESCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUES, ERRORS, FILES, VERSIONS, EXAMPLES, AUTHORS and SEE ALSO.

who ami linux

The syntax for the ssh command is as follows:

ssh stands for “Secure Shell”. It is a protocol used to securely connect to a remote server/system. ssh is secure in the sense that it transfers the data in encrypted form between the host and the client. It transfers inputs from the client to the host and relays back the output. ssh runs at TCP/IP port 22. 

sshd linux

The syntax for the scp command is as follows:

is a method of securely moving files between local and remote host. Using the command-line utility, one can even transfer data between two remote hosts. SCP roots from cryptographic network protocol Secure Shell (SSH). Typically, one leverages SSH to operate network services over the unsecured network securely.

scp linux
The syntax for the top command is as follows:

top command is used to show the Linux processes. It provides a dynamic real-time view of the running system. Usually, this command shows the summary information of the system and the list of processes or threads which are currently managed by the Linux Kernel. As soon as you will run this command it will open an interactive command mode where the top half portion will contain the statistics of processes and resource usage. And Lower half contains a list of the currently running processes. Pressing q will simply exit.

top linux
The syntax for the df command is as follows:

In Linux, the “df” command stands for “disk free” that checks the available space across the different file systems. Whenever you run this Linux command-line utility, it displays the amount of used and available blocks, total disk space, and a summary of where the file system is mounted.

This article explains the “df” command with useful examples. The supported content of this guide is as follows:

df linux
The syntax for the history command is as follows:

How to check command history in Linux with date? If you want to see command history in Linux with timestamp, here is how to get all command history in Linux Ubuntu

to linux

3 thoughts on “Top 20 Basic Linux commands Linux commands:”

  1. Pingback: NFS Mount linux

Leave a Comment