Shell aliases
Short commands for interactive shells – git (gitp, gitcm "…"), systemd and logs, files, Docker and iac. Override or switch them off in /etc/iac/aliases.local.conf, or share your own list across guests with aliases_url. List: aliases
Add to a guest
In the guest as root – container and VM alike:
update --add-modules aliasesRuns a normal update and installs the module on the way.
From the Proxmox node, without logging in:
pct exec <ID> -- update --add-modules aliases # container
ssh root@<IP> update --add-modules aliasesChoose when creating a guest
Without a dialog, on the Proxmox node:
IAC_NONINTERACTIVE=1 var_modules=auto-update,aliases \
bash -c "$(curl -fsSL https://iac.heyer.systems/<app>/ct.sh)"var_modules replaces the app's preselection – keep auto-update in the list if you want it. Interactive: choose “advanced” in the dialog, or tick the module in the generator on the app page.
Remove
update --remove-modules aliasesRemoves the module's packages, services, firewall rules and configuration again. Data stays.
Details
Short commands for interactive shells – SSH, tmux, the terminals of a web app. iac brings a set for Git, systemd, files, Docker and iac; you override them, switch them off or add your own, per guest or for all guests at once. Scripts and coding agents do not see them.
The aliases of iac
| Alias | Command | Alias | Command |
|---|---|---|---|
gits | git status | sst | systemctl status |
gitp | git push | sre | systemctl restart |
gitpl | git pull | sfa | systemctl --failed |
gita | git add | jf | journalctl -f -u |
gitcm | git commit -m | jl | journalctl -n 100 --no-pager -u |
gitca | git commit --amend | ll | ls -lah |
gitd | git diff | la | ls -A |
gitl | git log --oneline --graph -20 | .. / ... | cd .. / cd ../.. |
gitco | git checkout | df | df -h |
gitb | git branch | du1 | du -h -d1 |
dps | docker ps -a | up | update |
dlog | docker logs -f | smoke | the smoke test of the guest |
dex | docker exec -it |
Arguments go after the alias: gitcm "Fix the login", jf nginx.
Your own aliases
/etc/iac/aliases.local.conf is yours – iac creates it once and never changes it. One alias per
line:
gitp = git push --follow-tags # overrides the alias of iac
k = kubectl # a new one
up = # switches an alias of iac off
It applies in the next shell; update is not needed. aliases lists every active alias with the
file it comes from, aliases --check the lines that are skipped.
The same aliases on every guest
Put your list (same format) in a file anyone with the link may read, e.g. a Git repository, and
set its address – then run update:
aliases_url=https://git.example.org/me/dotfiles/raw/branch/main/aliases.conf
Every update fetches it again; when it is not reachable, the last fetched list stays. Order:
the aliases of iac, then the list of aliases_url, then aliases.local.conf – the last one
wins.
Safety
The files are read line by line as name = command, never run as a script, so a broken line
does nothing at login. But an alias decides what a command does when you type it: whoever can
change the file of aliases_url can make ll run anything as root. Use a URL only from a
repository you control, over HTTPS (iac fetches nothing else).
Removing the module
update --remove-modules aliases removes the aliases of iac, the fetched list and the line in
/etc/bash.bashrc; /etc/iac/aliases.local.conf stays.