When I run a command on a new machine (or install that I'm testing) I often find that the package needs to be installed first. This leads, for example, to the following sequence:
> colordiff
The program 'colordiff' is currently not installed. You can install it by typing:
sudo apt-get install colordiff
Argggh.
> apt-get install colordiff
Is there a way, when given the prompt that says the command You can install it by typing: sudo apt-get install XXXX
to run sudo apt-get install XXXX
without typing the entire line out? The best I can do is:
> apt-get install !!
but since some command (the shell?) is telling me what I should run, it would be nice if I could get that same program to run it for me.
I know a lot of people that make an alias for
sudo apt-get install
. Something likealias agi='sudo apt-get install'
in their.bashrc
file.