Bash aliases
Wieder mal aus der Rubrik „Warum sagt mir das denn eigentlich keiner?“:
»Aliases in Bash allow you to create shortcuts for long or frequently used commands. This makes it easier to execute complex commands with a simple keyword […]«
So als Beispiel: statt
apt update && apt upgrade -y
tippe ich jetzt nur noch
update
ins Terminal. Hamma!
Und wie jetzt? Mit einem Editor der Wahl (hier nano) die .bashrc öffnen
nano ~/.bashrc
und für mein Beispiel
alias update='apt update && apt upgrade -y'
eindengeln und abspeichern. Dann noch kurz
source ~/.bashrc
ausführen und fertig ist der Lack!
Kommentar
mit Mail kommentieren · via Matrix kontaktieren
Webmentions
Lade Reaktionen...