# **1. Bash and Terminals (Basics)**

## Terminal:

Terminal is nothing but another interface to do things on your machine.

1. `pwd`: Print Working Directory

    ```sh
    $ pwd
    ```

2. `cd`: Change Directory

    ```sh
    $ cd Desktop
    $ cd ../
    $ cd Desktop/screenshots
    $ cd ../..
    ```

3. `ls`: Listing all the files and folders in your current folder.

    ```sh
    $ ls
    ```

4. `mkdir`: Create new folder

    ```sh
    $ mkdir test
    ```

5. `touch`: Create new empty file

    ```sh
    $ touch index.js
    ```

6. `cat`: Prints contents of the file

    ```sh
    $ cat index.js
    $ cat test/index.js
    ```

7. `vi`: Vim Editor

    ```sh
    $ vi index.text

    Press `i` for insert mode and write anything in your file

    Bharat
    Kumar
    a
    ab

    Esc + :q! to exit from Vim Editor without saving the file
    Esc + :wq! to exit from Vim Editor with saving the file
    ```

8. `mv`: Move the file or folders

    ```sh
    $ mv index.js new-folder
    $ mv folder1 folder2
    ```

9. `cp`: Copy the files or folders

    ```sh
    $ cp index.js new-folder
    $ cp -r folder1 folder2
    ```

10. `clear`: Clear the terminal

    ```sh
    $ clear
    ```

11. `nvm`: Node Version Manager - Using this you can install node.

12. `npm`: Node Package Manager

    ```sh
    $ npm install express
    $ npm install array
    ```

13. `node`: Use to run file.

    ```sh
    $ node index.js
    ```

14. `git`:
