105.1 Lesson 1 Flashcards
Is a tty a login shell?
yes
What is the command in the output of ps aux | grep bash for pts bash?
bash
Which Bash specific file configures the user environment?
~/.bash_profile
Which files can ~/.bash_profile source?
~/.bash_login and ~/.profile
Which file will be executed if there is no ~/.bash_profile?
~/.bash_login
Is ~/.profile Bash specific?
no
When is ~/.profile sourced?
when neiter ~/.bash_profile nor ~/.bash_login exist.
Which file does ~/.profile source?
~/.bashrc
Which Bash specific file does clean-up operations when exiting the shell?
~/.bash_logout
Which file is run first when starting a shell: /etc/profile or ~/.profile?
/etc/profile
Where is an interactive Non-Login Bash configured globally?
/etc/bash.bashrc
Where is an interactive Non-Login Bash configured locally?
~/.bashrc
Which file does ~/.bashrc source?
~/.bash_aliases
How can bash be invoked as an non-interactive shell?
bash script.sh
Force a non-interactive bash shell to behave like a login shell!
bash -l script.sh
bash –login script.sh
How do you test if /etc/profile and ~/.profile are executed when running a shell?
Add an echo statement
Which files are loaded when a user logs into a machine via ssh?
/etc/profile
~/.profile
Where do scripts look for a startup file?
in the environment variable BASH_ENV
What does su do?
Execute commands with the privileges of another user account.
What does su do when no user id is specified?
Uses the superuser account.