103.1 Work on the Command Line Flashcards
What are four shells
- bash (bourne again shell)
- csh (C style syntax)
- ksh (Bourne Shell + C shell)
- zsh (Bash shell + Korn shell)
How do you turn on debugging?
set -x
To turn off set +x
Write a function that return “yo” to the screen. Then remove it.
function yo() { echo yo }
unset -f yo
How do you export a variable to the current shell and any new shells started from the current shell?
export YO=yo
What is the environment variable that contains the number of lines that the .bash_history will contain.
HISTFILESIZE
File located in the user’s home directory that contains the previously run commands.
.bash_history
How do you view the bash history?
history
What are the 8 sections of the man pages
S1 - Executable programs or shell commands
S2 - System Calls - Functions provided by the kernel
S3 - Library calls - Functions within program libraries
S4 - Special Files - Typically those found in /dev
S5 - File formats and conventions - for exaple /etc/passwd and other configuration files
S6 - Games
S7 - Miscellaneous items and conventions (man regex)
S8 - System administration commands - only for root
How do you search the man pages for a keyword?
apropos
or
man -k