-
Notifications
You must be signed in to change notification settings - Fork 3
How_to_use_the_linux_terminal
If you are someone how thinks the linux terminal (or bash) is something only advanced user use or it is a anachronism from a time long ago is tell you something: You are 100 times faster with a command line interface then with mouse and clicky buttons. You just need to know some tricks:
Nearly any command line tool on linux supports tab completion. For example you want change the directory from /home/username/dir1 to /home/username/dirWithExtremeLongName you type cd /home/username/dirW and hit the TAB key. The command line will be automatically completed. If not hit TAB two times and it will give you a list for all directories that match with your input.
The same works for installing new programs: You want to install build-essential so you type sudo apt install build-e and hit TAB. This will give you a list of available programs or complete with the only match. If the list is too long you can quit it with the q key.
The same for git: You need to checkout some branch but dont know the name? Type git checkout te hit TAB and git will complete the name or list all possible names.
If some output of a program is to long, or you want to search in this output you can use the less command. Simply append |less' to your command: commandWithLongOutput | less'
This will output a full page and you can navigate trought that page with the arrow keys or the page up/down keys. To search for a text in less type ?searchPattern. This will search only backwards sou you have to scroll to the end of the output to make a search on the whole document.
To quit less hit the q-key.