Forgetting to Sudo
By Andrew Miller in Editorial
Posted in Linux on
I’m not going to start my first blog post with an excessive introduction to who I am and why you should listen to what I have to say - this is the Google generation after all, go find out for yourself. My blog posts will be once a week and primarily focussed on Linux.
I did originally write a rather long winded piece as a reply to an Inquirer editorial that questioned the consumer readiness of Linux. Although I use Linux full-time on my clients and servers, I am by no means a Linux evangelist and I felt a balanced argument on this topic might solidify my standing from day one. Writing the piece ended up as several thousand words and I still don’t think I did the topic justice.
Although I’m happy to get dirty in the console writing scripts that aid my every day doings, I don’t believe in compiling anything from source. I see this as a real step backwards for computer usability and management. Many people consider editing a config file too difficult, after all.
Anyone who has found themselves stuck in the Ubuntu console for a while, will know how irritating it is to type in a command and forget to have the “sudo” at the beginning, which tells the machine to the run the command elevated as the “root” user. For example.
# rm tmp
rm: cannot remove 'tmp':Permission Denied
# sudo rm tmp
#
The obvious solution is to press the up arrow to go through your history, then press home, then type in sudo. If you are on a laptop, the home key is not always particularly accessible, so I found myself holding down the left key until I reached the end. After looking into this today, there are a number of other alternatives to speed up this regular annoyance.
Firstly, in a bash console, pressing CTRL+A will simulate the home key. Secondly, a slightly easier approach is to type “sudo !!”. The explanation marks will be replaced with the last command run and your command will run as root. Now there’s a time saver!
Comment by Sharon Jackson - September 19, 2008 on 2:53 pm
I’ve done that a couple of times - thanks for the tip. As a newbie linux user I need all the tips I can get lol
Make a comment
Tag cloud
Most commented posts
Highest Rated Blog Posts
- Linux netbooks returned more than Windows (100%)
- Creative Releases X-Fi Drives as Open Source (100%)
- Flash 10 on Linux Launches in Unison (100%)
- Android Released to the Wild (100%)
- Is that a projector in your pocket, or... (100%)
- GNU? Isn't that some kind of monkey? (95%)
- Ubuntu deadlines causes dead cards. (90%)
- Nobody at IBM is using Vista (70%)
- Linux Has Been Tick Boxed (68.6%)
- BBC in covering technology badly shocker. (66.6%)



