Basic commands in Linux

Given is a format of the command line in Linux terminal:

Untitled Diagram (3).jpg

Root Directories:

There are several root directories available in Linux.

This information will be helpful for you in learning any system level or driver level programming.

  1. bin – Consist of all the commands.
  2. lib – Consist of all the libraries.
  3. mnt – Useful for mounting any external device.
  4. dev – All the device driver related info is present in the dev directory.
  5. etc – Related to network files.
  6. user – User related info.
  7. home – There are so many users under the home directory.
  8. root – Default user activated in Linux.
  9. proc – Information about the processes.


Commands :

PWD                – Present working directory

ctrl + c             – Clear the screen

ls                      –  List of files under PWD

ls -l                   – Long list of files under PWD

mkdir              – To create new directory (folder) (example : mkdir blog)

cd                     – To change directory

Editors :

There are mainly three types of editors available :

  1. vi (command line editor)
  2. vim (command line editor)
  3. gedir (GUI based editor)


Create a New file :

Step 1-  cat > ABC

Step 2- Write in that file by pressing i (=editing mode)

Step 3- Press ctrl+D for saving and exit.

Step 4- Write ./ABC.out in the command line and hit enter you can see the output.

Note- Compilers are extension dependent and OS may be or may not be extension dependent.















Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Powered by

Up ↑

%d bloggers like this: