-
Basic commands:
-
whoami- prints username -
hostname- prints name of host -
pwd- prints current working directory -
ls- list contents of directory -
cd- change directory -
man <command>- manual page for any command -
info <command>- alternative toman
-
-
Resources such as Explainshell can be used to understand commands.
-
Commands will also have arguments and options; we can combine multiple single-character options.
-
Text file contents can be viewed using basic programs like
more,lessandcat. -
catcan be used to concatenate files as well; for example,cat file1.txt file2.txtwill print contents of both files. -
If we run
catwithout a filename, it echoes whatever we type. -
catcan be used with redirectional operators as well; for examplecat file1.txt file3.txt > combined.txtredirects the output to 'combined.txt' file.