Basic command line tools for unix terminal
Linux Basic Commands
pwd: prints working directory.ls:lists all the folders in current directory (This will list only visible files and folders (hidden files will not be visible)ls-al: list all the folders and files which includes hidden files with permissions like r- read w-write x- executels -aDocument/ :-ais flag,Document/is argumemnts.: current folder,..: prev foldercd folder/cd ..cd ~: current home directorhistory:list out all the command lines we usedclear: to clear the shellvolumes, mount- external drives pendrive etcrwx-read write execute- permissions and gives users who have access to the foldertop- network monitormkdir: used to create new directorymkdir folderName/: mkdir followed by folder namecd fol(TAB)- auto completetouch helloworld.sh: create new file
Vi Basics
vi hellowrod.sh:create new files./helloworld.sh: to execute the current directory filevi- only keyboard not mouse- Visual only modehjkl- navigate like arrow top bottom right lefti: insert mode to start typing text in viESC- to escapte from insert:enter command mode:w- write (Save mode):q- quit:wq- write and quit (save and close)
Permission Basics
chmod- modify the current use permissioncdmod +x helloworld.sh: +x modified the user to have execute accesscdmod -x helloworld.sh: -x removes the execute access
Link to File Permissions Tutorial
All the system commands are softwares in linux
- which ls : outputs : /usr/bin/ls - ls is a software
- echo $Path lists all the paths the os will search when looking for a command
- cat helloworld.sh - view the content of the file
Package Managers:
Package managers helps to download and install the packages and its dependencies. which reduces manual work of configuration lock: has all the manuals logged what packages are installed including dependecies - u can view and remove if u want ubundu apt install and remove feroro: yum install and remove windows: has chocolaty package manager- need to try mac has brew cask as package manager
- rm : delete
- rm -r fooldername/ : deletes the folder (-r is flag)
mkdocs: ZEN KNOWLEDGE BASEpip install mkdocs