Given is a format of the command line in Linux terminal:
There are several root directories available in Linux.
This information will be helpful for you in learning any system level or driver level programming.
- bin – Consist of all the commands.
- lib – Consist of all the libraries.
- mnt – Useful for mounting any external device.
- dev – All the device driver related info is present in the dev directory.
- etc – Related to network files.
- user – User related info.
- home – There are so many users under the home directory.
- root – Default user activated in Linux.
- proc – Information about the processes.
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
There are mainly three types of editors available :
- vi (command line editor)
- vim (command line editor)
- 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.