What are the basic commands to use in the terminal and what are the official/main stores/repositories?

Hi all friends.

I am a new linux user and only know how to use basic install/remove commands in terminal.

I have tried Ubuntu and Fedora, in Ubuntu the “apt” and “snap” command was used to install programs. That is, they are 2 different stores/repositories, correct?

In Fedora the “dnf” command was used, and if you needed a program that wasn’t there, you had to use the “flatpak” command. It also had 2 stores/repositories.

What are the main/official stores/repositories and what would be the main one? Does EndeavourOS also have 2 like Ubuntu and Fedora?

Is there an official guide to all the commands? (although I’ll probably just use the basic ones)

Thanks in advance friends!

Almost everything you need can be found in the repos or in AUR(A community maintained collection).

The command yay (A wrapper for pacman) can install software from both those locations.

However, if you prefer, we also support installing from flatpaks, snaps and appimages. That being said, I suspect only a small portion of our community uses snaps due the privacy implications and the usability issues.

2 Likes

This is a good place to start on the commands - https://wiki.archlinux.org/title/Pacman/Rosetta

5 Likes

Thanks for your answer friend.

Although I don’t understand much about Linux, I don’t like Snap/Ubuntu/Canonical either, I heard that it has become very proprietary and they are collecting a lot of information and personal data from users (I don’t know if it’s true). That’s why I moved to Fedora, but I heard that Arch/EndeavourOS were better on these issues and that’s why I moved here.

It’s great that EndeavourOS/Arch supports Flatpak and other packages (I think that’s what it’s called), but I’d like to use the EndeavourOS/Arch core ones.

Sorry, my English is very bad, I didn’t exactly understand the difference between pacman and yay. Is it some kind of shorthand, like “apt/apt-get/aptitude”? Or something like “dnf update/dnf up”?

I have seen a video tutorial on youtube where they update first with the command “sudo pacman” and then with “yay”. So, are they different repositories? Or maybe a youtuber mistake?

Do you mean that if I use “yay”, it will ask me if I want to install X program from one of the 2 repositories, or will the “better” one be installed automatically?

For example, I need to install Steam and a program that is not in most repositories, is called JDownloader (or JDownloader 2).

So (thanks to the guide one of our mates put up in this thread), to install Steam and JDownloader you should use:

sudo pacman -S steam
sudo pacman -S jdownloader

either

sudo yay -S steam
sudo yay -S jdownloader

And should I update pacman and yay with different commands?

Also, I have seen the command “Syyu” instead of “Syu”, to update everything. I don’t know which one I should use.

Sorry, I’m sure these are dumb questions, but I’m looking at tutorials and guides to try to ask as little as possible, but I still have very basic questions.

Thanks again!

Thanks for the guide friend, I’m learning all the commands you’ve shown me, plus I like being able to compare it with the Ubuntu and Fedora commands.

It seems that -Syu updates everything and you don’t have to use various commands like in Ubuntu/Fedora. Although I have also seen the -Syyu command in a youtube video tutorial, but I don’t know what the differences are and if it is safe to use.

Also, “yay” doesn’t appear in that guide, do arch/pacma commands such as -S or -Syu work for yay, or does yay use different commands?

Thanks again friend.

1 Like

yay calls pacman so to update your system all you need to type is:

yay

That will update both repo packages and AUR packages.

The same package name isn’t allowed to exist in both AUR and the repos. If you install using an explicit packagename such as yay -S steam, it will install it steam from the repos because a package of that name cannot also be in AUR.

However, if you type yay steam it will search both the repos and AUR for packages related to each and let you pick. However, it clearly shows which ones are in the repos and which are in AUR.

So for example, yay -S steam and sudo pacman -S steam will do the exact same thing. However, yay -S btrfs-assistant and sudo pacman -S btrfs-assistant won’t have the same effect. Because btrfs-asssitant is only in AUR, you can’t install it with pacman, that command will fail.

It is worth noting that you never use sudo with yay.

Simply running yay will handle it. It first calls pacman to update your repo packages and then updates your AUR packages. Even when you use yay, it is using pacman to install your packages.

You should use -Syu. However, with yay you don’t need either, you can simply type yay

Yes, yay uses the same syntax as pacman. However, yay has additional options in addition to pacman.

2 Likes

Omg, thank you very much for your complete answer, I finally understood everything!

Also, thanks for clarifying that sudo should not be used with yay, with flatpak it should not be used either but I did it by mistake, and I had problems with some programs that did not have access to create files, but when I reinstalled them without sudo, they worked again correctly.

I think I’ve fallen in love with the yay command, it’s much easier than in ubuntu and fedora, and can handle both repositories at once.

Now I regret not having installed EndeavourOs sooner for fear that it would be too difficult.

Thanks again for your help and for solving all my doubts friend!

Why is that?

Because it is an AUR helper. You should never build an AUR package as root. That would let an error in a PKGBUILD have potentially disastrous ramifications.

yay will build the packages as your normal user and then escalate to root only to install the package.

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.