Skip to content

Latest commit

 

History

History
98 lines (67 loc) · 1.43 KB

File metadata and controls

98 lines (67 loc) · 1.43 KB

1. Bash and Terminals (Basics)

Terminal:

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

  1. pwd: Print Working Directory

    $ pwd
  2. cd: Change Directory

    $ cd Desktop
    $ cd ../
    $ cd Desktop/screenshots
    $ cd ../..
  3. ls: Listing all the files and folders in your current folder.

    $ ls
  4. mkdir: Create new folder

    $ mkdir test
  5. touch: Create new empty file

    $ touch index.js
  6. cat: Prints contents of the file

    $ cat index.js
    $ cat test/index.js
  7. vi: Vim Editor

    $ 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

    $ mv index.js new-folder
    $ mv folder1 folder2
  9. cp: Copy the files or folders

    $ cp index.js new-folder
    $ cp -r folder1 folder2
  10. clear: Clear the terminal

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

  12. npm: Node Package Manager

    $ npm install express
    $ npm install array
  13. node: Use to run file.

    $ node index.js
  14. git: