-
Using basic commands like--
GIVEN BELOW ARE COMMANDS USE; SYNTAX IN THIS FORMAT executing just ls gives lists of directory of that folder
- cd opening another folder ; cd subfolder
- ls listing components of a folder; executing just ls gives lists of directory of that folder
- pwd locating the directory currently present in; exe cuting just ls gives lists of directory of that folder
- ls -l listing the directory in more informative way ; just execution;
- ls -la same as above but more user readable form;just execution
- ls -lah;just execution
- ll alias for above;just execution
- cd .. going back to previous directory; just execution
- cd / going to home directory; just execution
- man command - manual to a command; man 'command'
- chmod -changing user permision to read/ write / execute for self/friends/global; chmod xyz 'folder_address' sudo may be required
- sudo - acts as a suprema; sudo command
- mkdir -creates new folder;mkdir folder_name
- touch- create new file (.txt); touch new_file_name
- cat - shows the component of that .txt file; cat file address
- echo- can be used to print any text in the command line or add text in the a .txt file;
- to just print in terminal !!
- to add text in a txt file; echo "text" > file_name.txt
- cp -copy files and directory ; cp src_file dest_file
- mv- rename a file -rename; mv old_name new_name
- rm - remove a file; rm file_name
- sudo su - changes user password req
- cd /mnt/ -used to access windows using WSL
- history -used to see older commands
- grep command - to find a given line ; grep -rnw pattern file
- history > -c to delete history
- hostname - determine system
- VIM -used to edit text files
-
Used to write/edit text document
-
Basic commands like--
- h, k,l,j to move left,up,right,down respectively
- :q! to leave
- :x to delete
- :i to insert
- :a to append
- :qw to save and quit
- :w to save
- vim file_name.txt to edit a txt file
- log files can also be accessed using vim
- '0' takes you to the start of the line
- dd to delete an entire line
- u undo
- ctrl+r undoes the undo
- gg takes to the start of the file
- G takes to end of the file we can always find vimtutor or man command