Anyone suffer from command line salad?

What is this magical world of Alias? I can shorten commands lines and reword them?

Absolutely. Example:

alias update='sudo pacman -Syu'

If you put this in your .bashrc file, then update is all you need to type to get up-to-date…

There is a thread here somewhere…

Thread link

Share your alias AND/OR function

you might want to look through for ideas - or borrowing :grin:

4 Likes

Awesome, I’m adding this to my Wiki.

How about

alias update='yay'

so that it updates the AUR packages as well? But then the alias is longer than the command :rofl:

2 Likes

But doesn’t sudo pacman -Syu update AUR as well?

Nope, only the packages from the repos.

2 Likes

Isn’t the AUR in the repos? If not, how can I add it?

It may be a good idea to read this:

The AUR is not a repo, it is a collection of PKGBUILD files which you can use to build packages in order to install software which is not in the repos.

1 Like

But I had apps from the AUR, how do I update it, using yay?

Yes. Just running yay in the terminal updates the packages from the repos and the packages from the AUR. This is because yay is both a pacman wrapper and an AUR helper.

1 Like

How did you add the AURs?

Depending on how your system is setup, if Endeavour out of the box, sudo yay should update AURs.

No sudo with yay, please. Just yay is sufficient.

2 Likes

I had added them with pamac

oh no. I was speaking from memory, so that was incorrect. Thanks for saying something.

Why is sudo not used with yay?

1 Like

Because yay already asks you for sudo password when it needs it, it has that built in.

3 Likes

Running from memory has proven bad for me already.

I use pamac to browse files and download and I update AURs with yay (It’s the one command I’ve memorized the first time looking at, minus the occasion mistake of sudo).

Because building an AUR package with sudo is a pretty significant security risk. yay will build the package as a normal user and then only use sudo to install it.

5 Likes

A good general principle to always adhere to: if something works without sudo, do not use sudo.

8 Likes