What are the two types of commands. Explain the differences.
Describe three types of quotes in Bash.
How to see if a command is internal or external?
Use command “type” and the command.
$ type echo
echo is a shell builtin
$ type man
man is /usr/bin/man
What is a variable? What does it do?
Variables are pieces of storage for data, such as text or numbers. Once set, a variable’s value can be accessed at a later time.
What are the two types of variables? Describe them.
What does the command “echo” do? How is it used?
Displays any variable. In order to access the value of the variable you will need to use $ (dollar sign) in front of the variable’s name.
How to remove a variable?
Use command “unset”.
$ echo $greeting
hey
$ unset greeting
$ echo $greeting
What does the PATH variable do?
It stores a list of directories, separated by a colon, that contain executable programs eligible as commands from the Linux shell.
What does the command “which” do?
It stores a list of directories, separated by a colon, that contain executable programs eligible as commands from the Linux shell.
What do the characters below do?
What does the command “w” do?
Shows who is logged on on and what they are doing.
What does the command “last” do?
Shows listing of last logged in users. It searches through the /var/log/wtmp file (or the file designated by the -f option) and displays a list of all users logged in (and out) since that file was created.