-
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
,less
andcat
. -
cat
can be used to concatenate files as well; for example,cat file1.txt file2.txt
will print contents of both files. -
If we run
cat
without a filename, it echoes whatever we type. -
cat
can be used with redirectional operators as well; for examplecat file1.txt file3.txt > combined.txt
redirects the output to 'combined.txt' file.