# Basic Linux Commands

![](https://cdn-images-1.medium.com/max/800/1*DCECAFl-Jw0C6DjBH9A0lw.png align="center")

* `man` -&gt; we type man to get manual.
    
* eg. "man ls" we get all the commands related to the listing.
    
* man ls command
    
* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680360808709/13819f2f-81ed-4202-a3e2-bcb5fbc5fc09.png align="center")
    

* Description of manual command.
    

[![man  ls](https://user-images.githubusercontent.com/76991475/223135232-ac540eda-ebae-4c2c-9c89-097d7eb02afa.png align="left")](https://user-images.githubusercontent.com/76991475/223135232-ac540eda-ebae-4c2c-9c89-097d7eb02afa.png)

* `clear` -&gt; It is used to clear the terminal or screen.
    
* `clear -x` -&gt; It clears the terminal but we can scroll to check the previous data.
    
* `pwd` -&gt; Whenever we feel lost in the file system, call the pwd command to know where you are: It will print the current folder path.
    
* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680360935151/9b9c05e1-e872-4ccc-940b-5c03990fe8fd.png align="center")
    

## listing command

* `ls` -&gt; Inside a folder you can list all the files that the folder contains using the ls command.
    
* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680361028383/aa22d9df-a679-4454-9187-970280de7819.png align="center")
    

* `ls -l` -&gt; provides a long form of a list.
    
* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680361065977/feb1cc52-7fec-4c6b-8bab-362cffee0586.png align="center")
    

* `ls -a` -&gt; also show .files from the list.
    

* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680361109674/bf694fd5-15a7-4d08-bc8a-24e73d41f8e2.png align="center")
    
    `ls -al` -&gt; show both long-form and .files from the list.
    

* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680361156717/52e538d2-8265-4ddc-8532-48d566d0f21d.png align="center")
    
    `ls -i` -&gt; print the index number of each file.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680361194266/727c9901-12dd-462e-b2aa-52407815e4f6.png align="center")

## Change Directory

* `cd` -&gt; cd means "change directory" which changes the path from one folder to another folder.
    
* eg. " cd A/ " so now we are in the A folder.
    

* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680363203734/19306503-6d44-4681-869f-3c1c4cbf0c7c.png align="center")
    
    `cd ..` -&gt; This means changing the directory to one folder back.
    

* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680363299850/c2d9d070-3ab4-4386-8e30-caadfcb25893.png align="center")
    
    `cd ../../../..` -&gt; This means changing directory to 4 folders back.
    
* **Make Directory**
    

* `mkdir` -&gt; Means Make Directory or Make One Folder.
    
* eg. mkdir series -&gt; so we made a series folder.
    

* ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680364329491/58a0b4a1-0ec0-48af-8f2f-a9340851b47b.png align="center")
    
    `mkdir -p` -&gt; is used to create nested folder.
    
* eg. mkdir -p A/B/C/D/E so we created nested folder of A where we folder insider folder.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680364455107/e9f3889e-d470-4d00-9d1d-71447ff19f77.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1680364525213/0cbb032c-5781-4b8a-988e-7bb9ef8708e0.png align="center")
