Create Bash_Aliases

Create a seperate file and activate it.

Create a seperate file:

touch ~/.bash_aliases

open it...

nano ~/.bash_aliases

and write (c&p) into it e.g.:

alias xxx='echo "Welcome $USER."'alias my-update="apt update && apt upgrade"alias my-upgrade="apt dist-upgrade && apt full-upgrade"alias my-cleanup="apt autoremove && apt autoclean && apt clean && apt purge"

STRG+O & STRG+X

... and activate it with:

source ~/.bash_aliases

In your:

nano ~/.bashrc

write (c&p) at the and:

if [ -f ~/.bash_aliases ]; then. ~/.bash_aliasesfi

STRG+O & STRG+X

now you can activate it with:

. ~/.bashrc

After a reboot, you can run your Command in Terminal per Shortcut e.g.:

my-update

Collected Commands:

Saved & Used as/in .bash_aliases

sources:

//opensource.com/article/19/7/bash-aliases

Tagged


WEBMANAGEMENT.online
Layout, Konfiguration, Mentoring & Support.

© WEBMANAGEMENT.online