An alias is like a shortcut.
But for a string entered into the terminal.
It is a command, so you can enter it like so:
alias sysinfo='inxi -Farzy'
And then … if you enter sysinfo
into the terminal and press Enter … it will perform that inxi command.
Similarly, you can place a line like that in your shells rc file (~/.bashrc
for bash) so that you always have access to that command.
For example to achieve ‘update-grub’ without the package I have in mine
alias sudo='sudo '
alias update-grub='grub-mkconfig -o /boot/grub/grub.cfg'
(this is an example of using the sudo trick mentioned above … which is required to be able to pass sudo
to aliases. The other approach is to include sudo
in the alias itself.)
A recent thread/post discussed aliases as well
Do note that the above suggestion used examples … I do not know what/how you exactly you make your snapshots, or where they are located etc.
But yes, the gist of the idea was to combine both steps (make a snapshot, run grub-mkconfig/update-grub) into a simple single alias.