Linux Directories

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

Linux Directories


What are Commands

A command is an instruction given to our computer by us to do whatever we want. In Mac OS, and Linux it is called terminal, whereas, in windows it is called command prompt. Commands are always case sensitive.

Commands are executed by typing in at the command line followed by pressing enter key.

This command further passes to the shell which reads the command and execute it. Shell is a method for the user to interact with the system. Default shell in Linux is called bash (Bourne-Again Shell).

There are two types of shell commands:

  • Built-in shell commands: They are part of a shell. Each shell has some built in commands.
  • External/Linux commands: Each external command is a separate executable program written in C or other programming languages.

Linux Directory Commands

Directory Command Description
pwd The pwd command stands for (print working directory). It displays the current working location or directory of the user. It displays the whole working path starting with /. It is a built-in command.
ls The ls command is used to show the list of a folder. It will list out all the files in the directed folder.
cd The cd command stands for (change directory). It is used to change to the directory you want to work from the present directory.
mkdir With mkdir command you can create your own directory.
rmdir The rmdir command is used to remove a directory from your system.