Shell/Terminal Review
When working from the terminal there are a few file based commands that are used on a daily basis and you will need to be comfortable using them through the course.
Common Commands
cd
- Change Directorymkdir
- Make a new Directorytouch
- Make a new fileopen
- Open file or directory with the default program (based on extension)ls
- List all contents of a Directorypwd
- Print current pathmv
- Move or rename a file or directorycp
- Copy file or directoryrm
- Remove file or directoryecho
- Print out some textless
- Open a file in a read only state
Exit Codes
Usually when we run commands from the terminal, they will automatically exit after doing a bit of work. We can also run applications from the terminal that run until we tell them to stop. Other times, there may be an error in a script that makes it hang up. For these situations, it is vital to know the different ways to send manual exit codes to your shell process.
CTRL + C
- Code 130 - Manual exit from scriptCTRL + D
- End of File
How to exit vim
/vi
I've been using Vim for about 2 years now, mostly because I can't figure out how to exit it.
— I Am Devloper (@iamdevloper) February 17, 2014
Cool Shortcuts
cd -
CTRL + R
UP
/DOWN
- Tab completion