Customizing the Bash Shell Flashcards
env
Displays all environment variables
$USER
- Current user’s username.
- “whoami” displays this
$SHELL
Shell the user is working as
$TERM
Current terminal
$PS1
Default bash prompt
\h
hostname
\w
current working directory (shows entire path)
\W
current working directory (only shows the one specific directory name you are in)
\u
username
\@
12 hour am/pm date
\t
24 hour hh:mm:ss
\T
12 hour hh:mm:ss
\j
number of jobs running on the shell
\d
date
\H
full hostname
$HOME
User’s home directory path
$LD_LIBRARY_PATH
Directory in which libraries are found and bin executable files are located
$HOSTNAME
System hostname
$PWD
Current working directory
$EDITOR
Default editor when the system opens files
Holds the location of the users mail spool
Create an alias to the command “vi file.txt” called openfile
alias openfile=”vi file.txt”
Global bash config file
/etc/bashrc (Red Hat/CentOS)
/etc/bash.bashrc (Debian/Ubuntu)
Directory containing what should be given to new users by default when they are created
/etc/skel