NOTE: aliases for apt-get are at the top, aliases for systemd’s journalctl (debian version) are at the bottom

Aliases if you dont know make life easier on linux by doing direct substition of a command. Example: If I set an alias for “agi” to be “apt-get install“. To set it type this “alias agi=’apt-get install’“. Then when I type “agi openssh” ENTER (without quotes), the system will acts as if I wrote “apt-get install openssh” (without quotes).

Lets make life easier with some apt-get aliases.

To unalias something just say “unalias <alias name>“. So to unalias the above example: “unalias agi

SYNTAX:

Below are the most common ones that I use, so I made this article as a NOTE TO SELF – Now I or you or anyone can use these, just copy paste them into your shell. I would recommend making a template entry with them in a clipboard manager such as clcl that way they are always at your finger tips to set.

APT GET ALIAS
###############

Pick one of the methods and stick to it, get used to it. Method4 is most straight forward. I use method1 (as its shortest).

METHOD1
==========

 

METHOD2
==========

 

 

METHOD3
==========

 

METHOD4
==========

 

 

JOURNALCTL SYSTEMD FOR DEBIAN ALIAS
#####################################

With systemd, the logs are now kept in the journal (along with /var/log/syslog, if you have that configured, they can run together – however the default for systemd is just the journal). the journal is called up on:

Most systemd systems have a journalctl file instead of a systemd-journalctl file. So make a symlink to point journalctl to the real file systemd-journalctl

Now to get all of the logs from beginning to end:

-a is for all and –no-pager is so that you dont have a pager like as if less is running the code (so you dont have to hit enter to go to next page, etc) so it prints everylog all out on the terminal

Make the alias, as this will be a common command:

If you dont want to make the link and just want the alias:
To unalias jour:

Leave a Reply

Your email address will not be published. Required fields are marked *