diff --git a/sources/tech/20221108.0 ⭐️⭐️ Apt++ Nala is Like Apt in Ubuntu but Better.md b/sources/tech/20221108.0 ⭐️⭐️ Apt++ Nala is Like Apt in Ubuntu but Better.md new file mode 100644 index 0000000000..2b0bbdd5c5 --- /dev/null +++ b/sources/tech/20221108.0 ⭐️⭐️ Apt++ Nala is Like Apt in Ubuntu but Better.md @@ -0,0 +1,172 @@ +[#]: subject: "Apt++? Nala is Like Apt in Ubuntu but Better" +[#]: via: "https://itsfoss.com/nala/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Apt++? Nala is Like Apt in Ubuntu but Better +====== + +For decades Debian and Ubuntu users [used apt-get commands][1]. When its simpler form apt was released, people liked how it showed a progress bar while installing packages. + +Irrespective of the progress bar, the packages get installed the same with apt-get and apt commands. + +But the progress bar enhances the user experience (UX) and today if I don’t see the green progress bar at the bottom, I feel something is amiss. + +Why am I telling you all this? Because I got an [apt-get vs apt][2] feeling when I used [Nala][3], a Python-based front end for APT. + +Take a look at a screenshot of [apt package upgrade][4] in progress with nala. + +![installing packages using nala][5] + +Like apt enhanced the user experience from apt-get, nala takes it to the next level by making it more human-readable and presenting only the relevant info with beautiful colors. + +But Nala does a lot more than adding colors to the terminal. + +### Nala: An enhanced, user-friendly tool for managing apt packages + +![using nala to remove packages][6] + +As you can see, It brought the list of packages that will be affected by the command I executed. And it presented only relevant info with beautiful colors. + +This is only one of the core features of Nala. Here are others: + +- Parallel downloads. +- Checks for the fastest mirrors and uses the fastest 3 by default to speed up downloads. +- Each command you execute will be stored as Nala history with a unique ID. +- Compatible with Fish and Zsh. +- Makes Apt more human-readable than ever. + +Sounds interesting? Let’s see how you can install and use it. + +### Installing Nala in Ubuntu 22.04 and higher + +Starting with 22.04, Nala is present in the universe repository of Ubuntu. So, the installation process is going to be one command only: + +``` +sudo apt install nala +``` + +For older versions, refer to the [official wiki][7] for installation instructions. + +### Using Nala in Ubuntu + +Using Nala is fairly simple as it follows almost the same command structure as apt. This means that you just have to interchange apt with nala in every command. + +For example, you can update repositories with Nala using this command: + +``` +sudo nala update +``` + +![sudo nala update][8] + +Similarly, to install a package: + +``` +sudo nala install package_name +``` + +And the package can be removed using: + +``` +sudo nala remove package_name +``` + +That’s elementary. Let’s see about using other interesting features I mentioned earlier. + +#### Fetch the fastest mirrors in Nala + +To fetch the fastest mirrors, you’d need to utilize the `fetch` utility. First, it will determine whether you are using Debian or Ubuntu and then list the fastest mirrors: + +``` +sudo nala fetch +``` + +![sudo nala fetch][9] + +And as you can see, I kept the top 4 fastest mirrors by separating them with their index number. Once you select them and press enter, it will show the summary: + +![saving fastest mirrors for nala][10] + +Press `Y` and it will save changes. Now, update Nala to take effect: + +``` +sudo nala update +``` + +#### Use transactional history + +This is the interactive way you list and use the history command inspired by the DNF history utility. + +You have to pair `history` with the nala command, and it will bring previously executed commands with relevant info: + +``` +nala history +``` + +![nala history][11] + +You can use an ID with `nala history` and it will get you the details of the specific operation. For example, if I want to have details of what it did while installing curl, I’d have to use ID no 9: + +``` +nala history info 9 +``` + +![nala history info 9][12] + +But that’s not it. You can alter the effect of a command using history. For example, I installed curl, so I can alter the effect (will remove the software) using the given command: + +``` +sudo nala history undo 9 +``` + +![sudo nala history undo 9][13] + +And you can redo the command from history using its ID. For example, I installed curl (ID = 9) previously, and if I want to do the same again, I have to use `redo` : + +``` +sudo nala history redo 9 +``` + +![sudo nala history redo 9][14] + +### Wrapping Up + +I understand that the apt command works fine. And I am not suggesting that everyone should replace apt with nala. It’s just good to see projects like these to focus on user experience. + +They are clearly inspired by the DNF package manager of Fedora and that’s not a bad thing. The apt developers can also take some hints and add similar features in future. + +For now, please share in the comments whether you liked nala or not. And if you liked it, will you use it extensively in place of [apt commands][15]? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/nala/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/apt-get-linux-guide/ +[2]: https://itsfoss.com/apt-vs-apt-get-difference/ +[3]: https://gitlab.com/volian/nala +[4]: https://itsfoss.com/apt-update-vs-upgrade/ +[5]: https://itsfoss.com/wp-content/uploads/2022/11/installing-packages-using-nala-1.png +[6]: https://itsfoss.com/wp-content/uploads/2022/11/using-nala-to-remove-packages.png +[7]: https://gitlab.com/volian/nala/-/wikis/Installation +[8]: https://itsfoss.com/wp-content/uploads/2022/11/sudo-nala-update.png +[9]: https://itsfoss.com/wp-content/uploads/2022/11/sudo-nala-fetch.png +[10]: https://itsfoss.com/wp-content/uploads/2022/11/saving-fastest-mirrors-for-nala.png +[11]: https://itsfoss.com/wp-content/uploads/2022/11/nala-history.png +[12]: https://itsfoss.com/wp-content/uploads/2022/11/nala-history-info-9.png +[13]: https://itsfoss.com/wp-content/uploads/2022/11/sudo-nala-history-undo-9.png +[14]: https://itsfoss.com/wp-content/uploads/2022/11/sudo-nala-history-redo-9.png +[15]: https://itsfoss.com/apt-command-guide/