- Bash Reference Manual
- the missing semester of your cs education 2020
- Ryans Tutorials - Linux Tutorial
- Ryans Tutorials - Bash Scripting Tutorial
- 30 Bash Script Examples
- GETTING AROUND DIRECTORIES & FILES
- UNIX SHELL Quote Tutorial
- Sed - An Introduction and Tutorial
- Sh - the Bourne Shell
- shellscript.sh
- Bash variables and command substitution
- Standard Tools
Tidbits
Mehrere Befehle hintereinander:
- If previous command failed with
;
the second one will run. - But with
&&
the second one will not run.
Command Prompt
Ändern auf $
PS1="$ " ; export PS1
command substitution syntax
Backticks:
`command`
oder neuere Varienate
$(command)
echo "Hello, $(whoami)."
.bashrc .bash_profile
.bash_profile
is executed for login shells, while .bashrc
is executed for interactive non-login shells.
When you login (type username and password) via console, either sitting at the machine, or remotely via ssh: .bash_profile is executed to configure your shell before the initial command prompt.
macOS zsh
Ändern des Command Prompts
Standard:
matejkafr@Franzs-iMac shell %
# PROMPT=%m%#
Die letztend 2 Subdirs + %
als prompt (bzw. #
wenn super user)
$ PROMPT='%2~ %# '
Prompt in hellem Grau darstellen:
$ PROMPT='%F{243}%2~ %#%f '
Package Manager (Debian, Ubuntu, Kali)
apt
(früher apt-get
, Advanced Package Tool)
-
To update the list of packages known by your system:
apt update
(you should execute this regularly to update your package lists)
-
To install the foo package and all its dependencies:
apt install foo
-
To remove the foo package from your system:
apt remove foo # plus remove configuration files apt purge foo
-
To list all packages for which newer versions are available:
apt list --upgradable
-
To upgrade all the packages on your system:
apt upgrade
GNU, BSD, POSIX
GNU und BSD sind 2 unterschiedliche Implementierungen der UNIX Tools unterscheiden sich in so manchen Feinheiten. Der kleinste gemeinsame Nenner dieser beiden ist der POSIX Standard.
What is the difference between Unix, Linux, BSD and GNU?
Windows Subsystem for Linux (WSL)
- Windows Subsystem for Linux Documentation
- How to setup Apache, MySQL and PHP in Linux Subsystem for Windows 10
See which version of Windows 10 you have
Ideen / ToDo
- Absoluten Pfad aus relativen Pfad ermitteln. Quelle der Idee: Shared filesystem von docker braucht absolute Pfade.