Basic Commands of Linux OS | CentOS | RHEL

In this Blog I will provide you all basic commands of Linux Operating system that are really useful to the beginner who are new to this dimension. 

  1. pwd— When you first open the terminal, you are in the home directory of your user. To know which directory you are in, you can use the “pwd” It gives us the absolute path, which means the path that starts from the root. The root is the base of the Linux file system. It is denoted by a forward slash( / ). The user directory is usually something like “/home/username”.
  2. ls — Use the “ls”command to know what files are in the directory you are in. You can see all the hidden files by using the command “ls -a”.
  • ls -d */command to list only directories
  • ls * command to list the contents of the directory with it’s subdirectories:
  • ls -R command to list all files and directories with their corresponding subdirectories down to the last file
  • ls -a command to list files or directories including hidden files or directories.
  • ls -t command to list files or directories and sort by last modified date in descending order (biggest to smallest).
  • Type the ls > output.txt command to print the output of the preceding command into an output.txt file. We can use any arguments.
  • ls -l shows file or directory, size, modified date and time, file or folder name and owner of the file, and its permission.
  • ls –ltr

For more information about 

Cd, cp, move, mkdir, rmdir, locate, find, ifconfig following below document.

Leave Comment

Your email address will not be published.