If you want to see the manual/help of each command you use man. For example if you want to see the manual of ls command then you type:
You can scroll down to see all the manual. To close the manual you just press q
grep Hello file.txt
You can combine two commands together with the help of pipe
ls | grep file
ls displays all the files and directories. grep searches for a pattern, and now it is searching for the pattern “file”. What pipe does? It took the result of the ls command(output) and gave it to the input of the grep command. So now grep searches for the “file” not in a specific file as the first example, but in the output of the ls.
ls | grep txt
Now grep searches for the pattern “txt” in the results of the ls command.
- Ubuntu 18.04 – Shell commands
- Ubuntu 18.04 – Shut down and restart
- Ubuntu 18.04 – Bash Shell | Terminal