Skip to content

What is the most popular command directory linux ubuntu?


Linux Directory Commands

1. pwd Command

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

Syntax:

  1. pwd

Output:

Linux Commands with Examples

2. mkdir Command

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

Syntax:

  1. mkdir <directory name>

Output:

Linux Commands with Examples

3. rmdir Command

The rmdir command is used to delete a directory.

Syntax:

  1. rmdir <directory name>

Output:

AD

Linux Commands with Examples

4. ls Command

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

Syntax:

  1. ls

Output:

Linux Commands with Examples

5. cd Command

AD

The cd command is used to change the current directory.

Syntax:

  1. cd <directory name>

Output:

Linux Commands with Examples

Linux File commands

6. touch Command

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

Syntax:

  1. touch <file name>
  2. touch <file1>  <file2> ....

Output:

Linux Commands with Examples

7. cat Command

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

Syntax:

  1. cat [OPTION]... [FILE]..

To create a file, execute it as follows:

  1. cat > <file name>
  2. // Enter file content

Press "CTRL+ D" keys to save the file. To display the content of the file, execute it as follows:

  1. cat <file name>

Output:

Linux Commands with Examples

8. rm Command

The rm command is used to remove a file.

Syntax:

rm <file name>

Output:

Sign In or Register to comment.