Bash
pwd
- shows the current directory pathls
- lists the files in the current pathtouch <filename.extension>
- creates a new file in the current pathcd <path>
- checkout to the path
ctrl
+a
- to move the cursor to beginning of the linectrl
+e
- to move the cursor to the end of the line
ctrl
+w
- to delete the last wordctrl
+u
- to delete all the way back to the start of the linectrl
+k
- to delete to the end of the line
sudo chgrp -R admin /usr/local
- set write permission for admin for certain dirsudo chown -R $(whoami) /usr/local
- makes/usr/local
writeable for the user
lsof -ti:9000 | xargs kill
- where 9000 is the port number here
ctrl
+r
- Search through the command history (after pressing, type to search, press ctrl-r repeatedly to cycle through more matches, press Enter to execute the found command, or hit the right arrow to put the result in the current line to allow editing)
Last modified 1mo ago