Usually, for some commands such as apt-get install xxx, I forget to add sudo first, then I need to retype it. What I want is in such cases, I just type a simple command, for example resudo. It will sudo my last command sudo apt-get install xxx. Is it possible in bash?
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
migrated from stackoverflow.com Feb 19 '11 at 15:23
|
You could just use bash's
Anyway bash offers many shortcuts for anything, you could just press the up arrow (in order to get back the last typed line), then press |
|||||||||||
|
apt-*in particular, there'swajig. – delnan Feb 19 '11 at 14:55