Once upon a time, when I first installed Ubuntu, the question “how do I add a program” was a whole quest. Where’s the App Store? How do I install Google Chrome or an image editor?
That’s when I first encountered such a powerful tool as a package manager. In that case, it was apt (advanced packaging tool). And although it sounds serious, it’s essentially just a system that lets you install, update, and remove software from your system.
Imagine this: you have a shelf with programs. To find, install, update or delete something – you just access it via the console. That shelf is managed by the package manager.
For example: sudo apt install htop
And that’s it – you already have a new process manager, htop.
From repositories – official online storages where thousands of programs live, already compiled and tested. In Debian/Ubuntu it’s apt, in Fedora/CentOS – dnf. There’s also pacman, zypper, and dozens of others.
There are two options:
In 90% of cases – the ready-made binary is installed. For example, you type: sudo apt install neofetch
And in 5 seconds you can view your ASCII system info in the terminal.
Because that’s how Linux works. One package depends on another. For example, you install something built on Python – and the system downloads Python itself, needed libraries, and dozens of other “extras”.
It’s not a bug, it’s a feature.
Sometimes it happens that a program isn’t included in the standard repository. For example, Slack, Spotify or a new tool from some startup.
What to do? Add a new source.
In Ubuntu:
sudo add-apt-repository ppa:user/project
sudo apt update
In CentOS:
sudo dnf config-manager --add-repo https://url.to/repo.repo
And – voila! – the program appears in your “store”.
apt search name
dnf search name
Then:
sudo apt install name
That’s all you need. Seriously.
Repositories aren’t just somewhere on GitHub. Packages are digitally signed, their integrity is verified. But if you added some “sketchy” repository – don’t be surprised if something goes wrong.
If you’re reading this and thinking: “Okay, at least now I understand what this is about,” – that’s already great.
But if you want to level up further:
👉 See the course program here