UPDATED ACTUAL Exam Questions and
CORRECT Answers
1.1 Describe common shells - CORRECT ANSWER - - Bash: default shell for most linux
distributions; sh-compatible; unlimited command history
- Tcsh/Csh: C shell; interactive login shell;
- Ksh: Korn shell; interactive command language
- Zsh: designed to be interactive; includes many indexes not in other shells (variable, function,
key)
- fish: user friendly shell; web based configuration; auto suggestion
1.2 common shell modes - CORRECT ANSWER - $ normal user prompt
# root user prompt
-- = posix mode makes bash emulate sh, this will disable the operation
sudo = auto to root
2.1 Where is command history saved to in bash? - CORRECT ANSWER - - command
history is saved to ~./.bash_history, accessible by pressing the up arrow key
- writes history from memory (HISTSIZE) to disk (HISTFILESIZE) when close the shell
2.1 How to create, read, copy, remove, change ownership, change permissions in bash and IMP
commands - CORRECT ANSWER - create: touch
read: cat
,copy: cp
remove: rm
change ownership: chown
change permissions: chmod
list: ls
list w/ more detail on a file : ls -l FILENAME
ps : process list
system informaion (kernal/hardware) : uname -a
help: --help
go to the home: cd
show current directory: pwd
show date: date
who am I logged in as: whoami
ping host: ping
get whois infor for a domain: whois domain
list netwoor connections: netstat
order of evaluation in bash - CORRECT ANSWER - redirection
aliases
expansion
command substitution
shell
2.2 Environment initialization - CORRECT ANSWER - -l logs in without a GUI
-i interactive mode with a GUI
, During Initialization of a shell environment the sources for the environment are pulled from the
following:
/etc/profile
(home directory ~) ~/.bash_login, ~/.bash_profile, ~/.profile
2.3 redirection - CORRECT ANSWER - used to put output into a file or variable
> writes to
>> appends to
mkdir = make a directory
2.3 Piping - CORRECT ANSWER - used to put output of a process into another process
[process 1] | [process2]
named pipes: info remains in the named pipe until system is shut down
mkfifo [pipeName]
EX: ls -l text.txt | grep "Modify"
2.4 bash boolean logic - CORRECT ANSWER - ! logical negation
|| OR
&& AND
-o logical OR
-a logical AND
All values are either True or False / 0 or 1
XOR
2.5 methods of gaining more information about commands - CORRECT ANSWER - man
[command]