Introduction to Unix CLI
What is Unix CLI?
Unix CLI is actually the shell, a text interface to the operating system. Shell interprets and executes your commands and their arguments by passing them to the operating system.
There are different shell variants, like bash, csh, ksh, sh, tcsh, etc., probably the most popular being bash. The name “bash” is an acronym for “Bourne Again SHell” and is an enhanced replacement for sh. In this short introductory we are going to cover bash.
Bash
Bash is an interactive and scriptable shell. Supports name expansion, wildcards and typing shortcuts.
Note: Interaction with bash is case-sensitive just like everything in Unix system.
Some useful shortcuts:
TAB, UP, DOWN, Ctrl+R, Esc+.
Popular commands
man
man is the system's manual pager. It is an interface to on-line manuals. man has it's own manual pager.
$ # Show default man page for top command $ man sleep $ # Show all manual pages for top command, successively $ man -a sleep
apropos
apropos searches the manual page names and descriptions for the specified keyword.
$ apropos
pwd
pwd prints the full name of the current working directory.
$ pwd /tmp/test/course2015