move dir fundamentals to basics

This commit is contained in:
Malin Freeborn
2020-01-05 21:06:49 +01:00
parent 4a6b551ad7
commit 2ab97c114d
22 changed files with 7 additions and 4 deletions

36
basics/shell.md Normal file
View File

@@ -0,0 +1,36 @@
# Shells
Dash - fast but limited funcionality, great for scripts.
sh - primitive and ubiquitous.
bash - the standard
elvish - user-friendly, but new, with a full file-browser embedded into the system.
# Login
All shells launch either as login or non-login. All remote sessions without a GUI withl require authentication, and therefore will be login.
## Login
These shells start by reading /etc/profile then the first of ~/.bash_profile, ~/.bash_login or ~/.profile, and load all given values.
## Non-Login
Non-login shells will read /etc/bash.bashrc and then the ~/.bashrc file. You can summon the different shell perameters with the command `.`.
For example, so summon the file ~/.bashrc, you can perform:
`. ~/.bashrc`
How the logout is handled depends upon ~/.bash_logout
# Defaults
The default shell config files to create for a new user are under /etc/skel.
# Shellcheck
Run `shellcheck script.sh` on your scripts to check them for mistakes.