3 Unix Shell
3 Unix Shell
Prompt for
regular user
username Machine or system name
Prompt for
root
Dr. Alekha Kumar Mishra
Types of command
●
Internal commands
– The shell has a number of built-in commands that are known as internal
commands.
– Example cd, mkdir, echo etc.
– These commands do not generate a process, and are directly executed by the
shell
– These commands are built into the shell and do not exist as separate files.
●
External commands
– External commands are Unix utilities and programs such as cat and ls.
– These commands exist in the form of individual files
– Found in either in the /bin directory, or in the /etc (admin commands) directory
●
whoami
– Prompt the name of the current user
●
tty
– prints the file name of the terminal connected
to standard input
●
ls
– Lists all the files and directories.
– Accepts the path to the listing directory as
argument(s).
– Also accept patterns (RE) for selecting files
and directories.