I noticed a fair number of commenters on my last post, “Why I use a Chromebook”, use the Linux on a Chromebook feature. More than expected, to be honest. I’ll bet only a few, if any, of them have stopped using
apt, or the Advanced Package Tool, command to install Linux apps. I have. I now use Nala for Linux, which is a front-end for the apt package manager command.
How to install Nala for Linux on a Chromebook
Normally, when someone refers to “a front-end”, people think of graphical user interfaces or GUIs. But apt is a Terminal command. So too is Nala.
However, it makes the installation of Linux apps nicer to look at, provides more useful information, and adds more features. Not only that, but it can download Linux packages quicker than apt and it provides a history of updates and installations. You can even revert actions from history.
Installation of Nala using Linux on Chromebooks is fairly simple. The instructions are here and I did the steps under the “Install the repository and key” section, followed by running this command in Linux on my Chromebook:
sudo apt update && sudo apt install nala-legacy
Don’t be worried about the inclusion of the word “legacy” in that command. It’s a version that will work with the Debian version of Linux on a Chromebook. Once the installation is complete, I suspect that will be the very last time you ever run the
apt command. Moving forward, you’ll use Nala in its place.
To illustrate the differences, here are two Linux instances running on the same Chromebook. I’m going to use apt in one to install Node and the Node Package Manager as an example. And I’ll use Nala in the other to install the exact same Linux packages on my Chromebook.
App installation comparison between apt and Nala
Here’s what running the
sudo apt install nodejs package looks like using apt. I first run the
apt command and see what packages will be installed.
I type the letter Y and all of the packages for Node are downloaded and installed in Linux on my Chromebook.
If you’ve ever installed a Linux app, this should be very familiar. And it works well. But, that doesn’t mean it provides the best experience and information.
Let’s take a look at Nala to compare.
Here I’m running the Nala installation command for the same Node package. You can immediately see the difference.
Instead of line after line of information, Nala cleans up the interface in an intuitive way.
And it gets better. You can’t see the part where I’m asked if I want to install Node but it’s the same prompt that apt provides. It should be since Nala uses apt on the back-end. This is what I see after typing the letter “Y” to proceed:
Now you see the installation step by step with a much nicer progress bar for every download and installation action.
OK, you’re saying, it looks nicer. So what? Remember when I said Nala adds simple, useful features atop apt? Let me share two of the most useful ones.
A useful history and faster downloads with Nala for Linux
First, I can easily view a full history of my installations for Linux on a Chromebook.
nala history to see your prior installation activities:
And you can see the history of each installation activity. Above, I ran the
nala history info 2 command to view the details of ID number 2 in my history, for example.
Finally, you can undo (essentially remove) or redo any Linux installations with the history.
Here’s what it looks like when I told Nala to undo the Node Package Manager install, which was ID number 2.
Yes, you can do these things with apt commands. But I like Nala’s presentation of the information much better.
Speaking of much better: I said that Nala can download Linux packages faster than apt can. That’s for two reasons. First, Nala supports parallel downloads so it can pull multiple files down at the same time. And second: It has a nifty feature that tests the fastest download sites, or mirrors.
Here I ran through the “fetch” command to test and configure my mirrors. Since I’m in eastern Pennsylvania, I’m not surprised to see servers in New York and my home state show the fastest results:
I chose the first three mirrors at the prompt and Nala asked if I wanted to add those to my list of repositories. I said yes and Nala did the rest. Now my downloads for Linux installations will be faster and customized to where I’m located.
I didn’t have to manually add those repositories to Linux on a Chromebook with any archaic commands or by editing a text file. It’s done.
Again, there’s nothing wrong with using the plain ol’ apt command. Millions of people running a Linux distro that support it do use it every day.
But you’re using Linux on a Chromebook! Chromebooks are supposed to be simple, secure, and speedy. Nala brings those same attributes to the Linux app install experience on a Chromebook, so for me, it’s good-bye apt!
12 thoughts on “Still using apt for Linux on a Chromebook? Try Nala instead”
Thanks for the article, I`ve been using apt for over 20 years and never really thought about using anything else. Nala seems much better so far. Using it on Ubuntu 22.04. thanks again.
I like aptitude but nala does look very nice & friendly, I may use it going forward.
Ah the package manager wars. Been going on for possibly 20 years!
Is Nala a median approach between apt and flatpaks (I have never been able to get snaps working on my Chromebooks even after following the Chrome Unboxed guide)? Or is it closer to flatpaks? I tried flatpaks but went back to apt because I noticed that applications installed via apt and those installed via flatpak updated differently – it seemed that the “installed by apt” got updated more quickly – and I wanted uniformity. (I do believe that a Google-run Linux app store should use flatpaks or snaps though because it is better for the end user who lacks command line experience.)
I’m getting this
“Ignoring file ‘non-free.listecho’ in directory ‘/etc/apt/sources.list.d/’ as it has an invalid filename extension
E: dpkg was interrupted, you must manually run ‘sudo dpkg –configure -a’ to correct the problem. ”
I tried the configure command but got,
“sudo dpkg –configure -a
dpkg: error processing package curl (–configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Errors were encountered while processing:
Thanks for sharing.👍
I have been using Linux Brew on ChromeOS for a while due to the long time macros usage. It works well so far.
Is Nala using apt under the hood I mean package-source wise?
Will this affect how Linux installs APK files?
This is apt with extra steps.
Can I just say that Linux has way to many package managers all basically doing the same thing getting packages from the same place at this point?
I tried using nala on my Chromebook, as well as my Ubuntu desktop, and it seems like drastic overkill – apt is plenty.
Parallel package imports would be nice I guess, but it doesn’t really matter much on Linux, and it’s much slower on my Chromebook! Probably because it is a chromebook – the real bottleneck’s is slow storage.
It’s just an option; obviously, nobody has to use it. As far as the slow storage, this is one of the reasons premium Chromebooks (with NVMe M.2 drives) exist. And yet people ask “why do premium Chromebooks exist?”🤣
Neat but I didn’t hit pay dirt until my fourth attempt at installing a graphics program:
4. mypaint (finally)
What’s up with that?
I got it to install only as just sudo apt install Nala. no -legacy