1. Shell types:
echo $SHELL
Typing the code above, the terminal will displays the type of shell of your operating system.
C Shell or Bourne Shell :
– C: csh, tcsh
– Bourne: bash, sh, zsh
2. Two types of env files (Public and Urs)
In /etc/, there are public envs, that’s means no matter which users login this machine, they all loading this file at beginning.
- /etc/profile, we do not recommend edit this file, because this is for all users.
- /etc/bashrc, system-level env file, public also, but for bash users only.
- ~/.bash_profile, user-level env file, but it will be run only one time when user login.
- ~/.bashrc, user-level env file, each time be run when user open a new shell.
3. Applied
Using source env-file-name
to active the env file immediately.
4. Save
If there is no permission to save by using :wq
, you can easily use :w !sudo tee %
to save your work.