Sunday, May 5, 2024
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 3154  / 3 Years ago, tue, august 3, 2021, 11:10:44

When one issues a command that does not exist in the terminal, it results in:



The program 'programname' is not installed. You can install it by typing:



sudo apt-get install programname


Is there any shortcut by which one does not have to retype the 'sudo apt-get install programname' line?


More From » command-line

 Answers
6

There is none by default, but it is not so hard to define one:



alias ii='sudo apt-get install'


You can then just call



ii !!


For more information, read man bash on aliases and history.


[#35849] Thursday, August 5, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ameatoes

Total Points: 321
Total Questions: 106
Total Answers: 112

Location: Belarus
Member since Sat, Jul 18, 2020
4 Years ago
ameatoes questions
Tue, Aug 16, 22, 22:50, 2 Years ago
Fri, May 14, 21, 03:36, 3 Years ago
Sat, Oct 8, 22, 01:00, 2 Years ago
Fri, Feb 17, 23, 14:44, 1 Year ago
;