Shell
The shell in linux is a program that allows the user to interact with the underlying OS by sending text commands.
Popular shells include:
- Bourne Again Shell (
bash) zshsh
Current shell can be determined reading the environment variable $SHELL. Furthermore, using
chshAllows one to change the shell for the user
Assumed shell
In these docs, it is assumed the shell is bash
Command types
Command come in two types. The command type can be used with a command as argument to verify which type a certain command is
- Internal: Come built in with the shell. E.g.
echo - External: Are binaries installed in the system. E.g
git,mv
Environment Variables
Environment variables are user-definable values that affect how running processes behave on the system. The OS sets up a group of variables by default. At any time, the set up environment variables for a user can be seen with
printenvTo create environment variables, there is two options
export FOO=bar: This will make the variable extend to all processes created from this shellFOO=bar: The variable will not go further