<?xml version="1.0"?><!-- generator="blandname tech forum" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>bn technical support forum Topic: Bash Sudo Shortcut for Ubuntu</title>
<link>http://forum.blandname.com/</link>
<description>bn technical support forum Topic: Bash Sudo Shortcut for Ubuntu</description>
<language>en</language>
<pubDate>Tue, 06 Jan 2009 03:46:07 +0000</pubDate>

<item>
<title>"Bash Sudo Shortcut for Ubuntu"</title>
<link>http://forum.blandname.com/topic/65#post-75</link>
<pubDate>Sun, 17 Jun 2007 02:15:55 +0000</pubDate>
<dc:creator>virtual</dc:creator>
<guid isPermaLink="false">75@http://forum.blandname.com/</guid>
<description>&lt;p&gt;I'll admit it, I love Ubuntu. But I'll come right out and say as well that I would probably say that about most Linux distributions lately - you've come a long way!&lt;/p&gt;
&lt;p&gt;When using the bash shell in Ubuntu ad Ubuntu server, there's one caveat to keep in mind: in order to run commands as root, you need to prefix them with the &lt;code&gt;sudo&lt;/code&gt; command in order to avoid permissions problems. &lt;/p&gt;
&lt;p&gt;There are two ways to avoid this. &lt;/p&gt;
&lt;p&gt;1) The shotgun solution. Create a typical root account so you can run &lt;code&gt;su&lt;/code&gt; then execute whatever commands you want, and hope you always log out. This can be accomplished by running the command:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo passwd&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and defining a password. This works, but almost defeats the purpose, don't you think?&lt;/p&gt;
&lt;p&gt;2) The time saver. You're bound to forget to prefix those &lt;code&gt;chmod&lt;/code&gt; and &lt;code&gt;make&lt;/code&gt; commands from time to time - you're human. With this little gem you won't be reminded of your &quot;humanity&quot; so often. When you enter a command that should have been run as root, but forget the &lt;code&gt;sudo&lt;/code&gt; part, just type in &lt;code&gt;sudo !!&lt;/code&gt; to issue the last command with &lt;code&gt;sudo&lt;/code&gt; in front of it. Behold:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$apt-get install bbpress&lt;/code&gt; (you'll be able to do this soon, I promise!)&lt;br /&gt;
... Permission Denied - you know the drill&lt;br /&gt;
&lt;code&gt;$sudo !!&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;$sudo apt-get install bbpress&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;Password:&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;There you go! Like I've always said, shotguns are sloppy solutions.
&lt;/p&gt;</description>
</item>

</channel>
</rss>