For so many commands which i type are correct even then i have errors like unable to locate package or sometimes it gives "invalid operation" . This error really kills me, how can i fix this?
2 Answers
This
sudo apt-get cpufrequtils
is missing a mandatory option. To install or remove use...
sudo apt-get install cpufrequtils
sudo apt-get remove cpufrequtils
-
Rinzwind's answer is correct but just to add some help if you are not sure you are choosing the correct package name you can look it up with 'apt-cache search [package-name]'. Even with a partial package name this will return a list of similar packages. Jul 16, 2017 at 15:29
-
hahaha, I feel like an idiot.. i forgot the "install" option... Mar 12, 2018 at 15:25
An more morecent alternative to apt-get
is the apt
command (see here for a discussion about their differences).
Maybe using apt
you more easily realize that installing isn't the only thing that these tool do. And as such you first have to tell them the operation you want to perform:
sudo apt install cpufrequtils
Without the install
the command wouldn't know whether you want to install or uninstall that package or if you simply want to search for it.
The name apt-get
may sound like it only "gets"("install") the programs, but this isn't true.
You should prefer apt
for interactive use as it provides a cleaner interface and colorized human friendly output. Use apt-get
or apt-cache
for scripts.
apt-get
you can useapt
. It does the same things in a more beginner friendly way plus it colorize output etc.