Quality of Life Tweaks¶
This page documents lots of little things that don't really need their own page but when implemented will improve your quality of life whilst administering the system.
Bash Aliases¶
Bash aliases enable complex commands to be shortned to a few characters. For example docker-compose -f ~/docker-compose.yml up -d
can be shortned to dcp up -d
with a the following alias:
1 |
|
Here are some more docker / docker-compose related ones.
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Making aliases persistent¶
Aliases created using the alias
command in the terminal will only be available for the current session. To make an alias persist across sessions it must be added the shell's initialization file. Here are some examples for popular shells:
- Bash:
~/.bashrc
, this is typically the default shell. - ZSH:
~/.zshrc
- Fish:
~/.config/fish/config.fish
Info
If you have a useful alias you think would benefit PMS users please submit a PR via GitHub for inclusion in this site following the format below. One alias or a group of related aliases showing example output.
Alias - Get container IPs¶
- Credit: @quietsy - Self-Hosted Discord server
This alias prints the IP, network and listening ports for each container.
1 2 3 4 5 6 7 |
|