<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Unix Tutorial</title>
	
	<link>http://www.unixtutorial.org</link>
	<description>Learn UNIX</description>
	<lastBuildDate>Wed, 03 Mar 2010 22:55:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/UnixTutorial" /><feedburner:info uri="unixtutorial" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Mounting NFS shares on Mac OS X</title>
		<link>http://feedproxy.google.com/~r/UnixTutorial/~3/zvvb5T5vWSk/</link>
		<comments>http://www.unixtutorial.org/2010/03/mounting-nfs-shares-on-mac-os-x/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 22:54:50 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[mac os]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[macos]]></category>
		<category><![CDATA[macosx]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=634</guid>
		<description><![CDATA[I've recently decided to give Mac OS X a try. For the past week or so I've been spending a good few hours a day working in Snow Leopard installed on a MacBook Pro borrowed from a friend. While Mac OS is unlike any Unix-like operating system I've managed so far, there are certainly some [...]]]></description>
			<content:encoded><![CDATA[<p>I've recently decided to give <strong>Mac OS X</strong> a try. For the past week or so I've been spending a good few hours a day working in <strong>Snow Leopard</strong> installed on a MacBook Pro borrowed from a friend.</p>
<p>While <strong>Mac OS</strong> is unlike any Unix-like operating system I've managed so far, there are certainly some of similarities. I can honestly say that I'm enjoying the Mac Book Pro so far, and hope to discover most of the differences compared to my previous Unix-like desktop which is Ubuntu 9.10.</p>
<h3>Mounting NFS on MAC OS X</h3>
<p>One thing which I noticed immediately was that out of the box it was impossible to mount any NFS shares from my Ubuntu NAS server. Any attempt to mount a remote filesystem would give me an error like this:</p>
<blockquote><p>mbp:~ root# <strong>mount nasbox:/try /mnt</strong><br />
mount_nfs: /mnt: Operation not permitted</p></blockquote>
<p>This error was happening for a relatively simple NFS share on the Ubuntu box:</p>
<blockquote><p>nasbox# <strong>cat /etc/exports</strong><br />
/try            (rw)</p></blockquote>
<p>&#8230; so I started looking around and realized that the reason for this strange problem is quite simple.</p>
<h3>Mac OS X uses non-standard port for outgoing NFS connections</h3>
<p>That's right &#8211; apparently, <strong>Mac OS X </strong>uses a non-privileged port (<strong>2049</strong>) for TCP and UDP connections serving the NFS transport. What this means is that most likely attempts to mount remote filesystems will fail, because most NFS servers don't really like connections from insecure ports.</p>
<p>There are two ways to approach this problem:</p>
<ol>
<li>Fix it on the client side (probably makes more sense)</li>
<li>Fix it on the NFS server side (if you manage both systems)</li>
</ol>
<h3>Using reserved NFS port number on Mac OS X</h3>
<p>There's a mount option supported by the <strong>mount_nfs</strong> command, which allows you to force the NFS client connections to originate from a privileged port. This will magically make your attempts to mount remote filesystems successful. The option is called <strong>resvport</strong>.</p>
<p>First we double-check that default mounts still don't work:</p>
<blockquote><p>mbp:~ root# <strong>mount nasbox:/try /mnt</strong><br />
mount_nfs: /mnt: Operation not permitted</p></blockquote>
<p>&#8230; and now let's use the <strong>resvport</strong> option:</p>
<blockquote><p>mbp:~ root# <strong>mount -o resvport nasbox:/try /mnt</strong></p></blockquote>
<p>&#8230; and make sure we're actually looking at a mounted filesystem:</p>
<blockquote><p>mbp:~ root# <strong>df -h /mnt</strong><br />
Filesystem   Size   Used  Avail Capacity  Mounted on<br />
nasbox:/try    61Gi   56Gi  2.6Gi    96%    /mnt</p></blockquote>
<h3>Allowing connections from non-privileged ports on NFS server</h3>
<p>Like I said, if you manage both the Mac OS based client and the NFS server, perhaps it makes more sense to relax the default NFS server security and allow the connections from non-privileged ports.</p>
<p>Just to remind you about the validity of such a decision, the option to allow non-privileged connections is called insecure.</p>
<p>Here's how you use it:</p>
<blockquote><p>nasbox# <strong>cat /etc/exports</strong><br />
/try            (rw,<strong>insecure</strong>)</p></blockquote>
<p>After making this change to the <strong>/etc/exports</strong> file, you'll have to restart your NFS server. On my Ubuntu NAS box, it's done like this:</p>
<blockquote><p>nasbox# <strong>/etc/init.d/nfs-kernel-server restart</strong><br />
* Stopping NFS kernel daemon<br />
&#8230;done.<br />
* Unexporting directories for NFS kernel daemon&#8230;<br />
&#8230;done.<br />
* Exporting directories for NFS kernel daemon&#8230;<br />
&#8230;done.<br />
* Starting NFS kernel daemon<br />
&#8230;done.</p></blockquote>
<p>We know are ready to attempt the default mount of the same filesystem on the <strong>Mac OS X</strong> client:</p>
<blockquote><p>mbp:~ root# <strong>mount nasbox:/try /mnt</strong></p></blockquote>
<p>That's it! I won't promise any <strong>Mac OS </strong>posts just yet, but if there is enough interest &#8211; I'd love to do the research and to post all the discoveries on the <strong><a title="Unix Tutorial" href="http://www.unixtutorial.org">Unix Tutorial</a></strong> pages.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=zvvb5T5vWSk:Xv13On8n1P0:kdmuIyMabB4"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=kdmuIyMabB4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=zvvb5T5vWSk:Xv13On8n1P0:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=zvvb5T5vWSk:Xv13On8n1P0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?i=zvvb5T5vWSk:Xv13On8n1P0:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UnixTutorial/~4/zvvb5T5vWSk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2010/03/mounting-nfs-shares-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.unixtutorial.org/2010/03/mounting-nfs-shares-on-mac-os-x/</feedburner:origLink></item>
		<item>
		<title>Suggest a topic for the Operating Systems Basics</title>
		<link>http://feedproxy.google.com/~r/UnixTutorial/~3/d1s7siWfU8o/</link>
		<comments>http://www.unixtutorial.org/2010/01/suggest-a-topic-for-the-operating-systems-basics/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 02:06:47 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=628</guid>
		<description><![CDATA[Hi everyone, and thanks for staying with Unix Tutorial for so long! My first weeks of the 2010 have been pretty busy, but I've been quietly upgrading the blog engine and components of the Unix Tutorial Members Area to get things ready for the long-awaited second module of the Introduction to Unix course. If you're [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone, and thanks for staying with <a title="Unix Tutorial" href="http://www.unixtutorial.org"><strong>Unix Tutorial</strong></a><strong> </strong>for so long! My first weeks of the 2010 have been pretty busy, but I've been quietly upgrading the blog engine and components of the <strong><a title="Unix Tutorial members" href="http://www.unixtutorial.org/members">Unix Tutorial Members Area</a></strong> to get things ready for the long-awaited second module of the <strong>Introduction to Unix</strong> course.</p>
<p>If you're an existing member and have a topic which you think belongs to the <strong>Operating Systems Basics</strong> module, please leave a comment.</p>
<p>The purpose of the module is to give a very high level overview of how modern operating systems work and to also explain the importance of securely managing all the available resources (hence a few topics on files, users and privileges). Almost every single topic deserves a separate module, if not a course, on its own &#8211; but for the moment it will be really basic stuff.</p>
<p>Here's the list of topics so far:</p>
<ul>
<li>What OS is and why we need it</li>
<li>Features of a modern OS</li>
<li>Kernel and kernel modules</li>
<li>Features of Unix OS</li>
<li>MINDMAP: Features and components of an OS</li>
<li>Everything is a file! Types of files in Unix</li>
<li>A typical filesystem tree of a Unix-like OS</li>
<li>Users, privileges and file ownership</li>
<li>Executing a binary file in Unix</li>
</ul>
<p>To all those of you asking for the date when this module will be posted: I will make the O<strong>perating Systems Basics</strong> module available to all the existing <a title="Unix Tutorial members" href="http://www.unixtutorial.org/members">Unix Tutorial Members</a> on <strong>February 1st, 2010</strong>.</p>
<h3>See also:</h3>
<ul>
<li><strong><a title="Unix Tutorial members" href="http://www.unixtutorial.org/members">Unix Tutorial &#8211; members area</a></strong></li>
<li><a title="Become a Unix Tutorial member" href="http://www.unixtutorial.org/2009/03/become-a-lifetime-unix-tutorial-member/">What Unix Tutorial members area is about</a></li>
<li><a title="Unix Tutorial - Facebook" href="http://www.unixtutorial.org/2009/12/unix-tutorial-gets-its-own-page-on-facebook/">Unix Tutorial gets a Facebook page</a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=d1s7siWfU8o:7UPRMRiBh8E:kdmuIyMabB4"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=kdmuIyMabB4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=d1s7siWfU8o:7UPRMRiBh8E:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=d1s7siWfU8o:7UPRMRiBh8E:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?i=d1s7siWfU8o:7UPRMRiBh8E:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UnixTutorial/~4/d1s7siWfU8o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2010/01/suggest-a-topic-for-the-operating-systems-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.unixtutorial.org/2010/01/suggest-a-topic-for-the-operating-systems-basics/</feedburner:origLink></item>
		<item>
		<title>Unix Tutorial Gets its Own Page on Facebook</title>
		<link>http://feedproxy.google.com/~r/UnixTutorial/~3/ZypbCdlfLOU/</link>
		<comments>http://www.unixtutorial.org/2009/12/unix-tutorial-gets-its-own-page-on-facebook/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 14:01:13 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=626</guid>
		<description><![CDATA[If you have a Facebook account and would like to get in touch with other visitors of this blog to discuss Unix, here's a great way to get started: join the Unix Tutorial Facebook page! See you all there, and feel free to share your suggestions &#8211; either here or on the wall of the [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a Facebook account and would like to get in touch with other visitors of this blog to discuss Unix, here's a great way to get started: <a href="http://bit.ly/54x4E7">join the Unix Tutorial Facebook page</a>!</p>
<p>See you all there, and feel free to share your suggestions &#8211; either here or on the wall of the <a href="http://bit.ly/54x4E7">Unix Tutorial page</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=ZypbCdlfLOU:YWJAo4ctujk:kdmuIyMabB4"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=kdmuIyMabB4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=ZypbCdlfLOU:YWJAo4ctujk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=ZypbCdlfLOU:YWJAo4ctujk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?i=ZypbCdlfLOU:YWJAo4ctujk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UnixTutorial/~4/ZypbCdlfLOU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/12/unix-tutorial-gets-its-own-page-on-facebook/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.unixtutorial.org/2009/12/unix-tutorial-gets-its-own-page-on-facebook/</feedburner:origLink></item>
		<item>
		<title>How To Disable IPv6 in Red Hat Linux</title>
		<link>http://feedproxy.google.com/~r/UnixTutorial/~3/8A80BZfOoHM/</link>
		<comments>http://www.unixtutorial.org/2009/12/how-to-disable-ipv6-in-red-hat-linux/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 10:37:45 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[RedHat]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=621</guid>
		<description><![CDATA[Since it may be a while before I'm ready to use the IPv6 on my systems, I've been disabling IPv6 on most servers so far. And since there's a particularly elegant way of doing this in Red Hat Linux, I think it's worth sharing. How to confirm if IPv6 is running on your system IPv6 [...]]]></description>
			<content:encoded><![CDATA[<p>Since it may be a while before I'm ready to use the <strong>IPv6 </strong>on my systems, I've been disabling IPv6 on most servers so far. And since there's a particularly elegant way of doing this in Red Hat Linux, I think it's worth sharing.</p>
<h3>How to confirm if IPv6 is running on your system</h3>
<p><strong>IPv6 </strong>is implemented as a kernel module, so you can use the <strong>lsmod </strong>command to confirm if it's currently running on your Red Hat system:</p>
<pre>$ <strong>lsmod | grep ip</strong>
ipv6                  410913  36</pre>
<p>If <strong>lsmod </strong>doesn't return anything, it confirms that your system isn't running IPv6.</p>
<h3>Prevent IPv6 from getting started by modprobe</h3>
<p>As you probably know, modprobe command is used for probing modules upon system boot. Probing simply means a module is loaded and an attempt is made to start it up. With any luck, the module starts successfully and its functionality becomes available to the Linux kernel.</p>
<p>For the boot stage, modprobe uses a special config file which helps you control its behavior: <strong>/etc/modprobe.conf</strong>. For now, let's just concentrate on the <strong>IPv6</strong> task at hand. To make sure modprobe doesn't load the actual module next time your OS reboots, add the following line to the top of the <strong>/etc/modprobe.con</strong>f file (yes, you're going to need root privileges for this):</p>
<pre>install ipv6 /bin/true</pre>
<p><strong>WHY THIS WORKS</strong>: just to quickly explain the line above, here's why we're using the <strong>/bin/true</strong> command. install is rule of the modprobe config file which overrides the standard way of probing a module. Effectively, it tells modprobe to just run the specified command for starting a module. In the line above, we're telling modprobe to use the <strong>/bin/true</strong> command for probing the <strong>ipv6 </strong>module. And as you remember, <strong>/bin/true</strong> is a command which doesn't do anything but still returns a successful completion code &#8211; so in effect we're doing nothing instead of loading the <strong>ipv6 </strong>module, and we're looking good while doing this too.</p>
<p>Next, add the the following two lines to the same <strong>/etc/modprobe.conf</strong> file, and they will ensure that common aliases used for starting the <strong>IPv6 </strong>module are ignored by modprobe:</p>
<pre>alias net-pf-10 off
alias ipv6 off</pre>
<p><strong>IMPORTANT</strong>: These change doesn't immediately disable <strong>IPv6 </strong>on your system. Being a pretty important module, IPv6 isn't easy to disable on a live system, and so the easiest is to always follow the changes above with a reboot.</p>
<h3>Make sure your IPv6 firewall is disabled</h3>
<p>The <strong>ip6tables </strong>service (<strong>/etc/init.d/ip6tables</strong> sciprt) is responsible for starting <strong>IPv6 </strong>firewall, and so you probably want to disable it:</p>
<pre># <strong>chkconfig ip6tables off</strong></pre>
<p>and then confirm that it won't be started next time you reboot or switch to any runlevel:</p>
<pre># <strong>chkconfig --list ip6tables</strong>
ip6tables       0:off   1:off   2:off   3:off   4:off   5:off   6:off</pre>
<p>That's it, there really is nothing else to disabling <strong>IPv6</strong>. Let me know if you have any questions, otherwise I'll talk to you soon!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=8A80BZfOoHM:LrgW12mZKzk:kdmuIyMabB4"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=kdmuIyMabB4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=8A80BZfOoHM:LrgW12mZKzk:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=8A80BZfOoHM:LrgW12mZKzk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?i=8A80BZfOoHM:LrgW12mZKzk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UnixTutorial/~4/8A80BZfOoHM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/12/how-to-disable-ipv6-in-red-hat-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.unixtutorial.org/2009/12/how-to-disable-ipv6-in-red-hat-linux/</feedburner:origLink></item>
		<item>
		<title>Climate Change: How You Can Help Prevent It</title>
		<link>http://feedproxy.google.com/~r/UnixTutorial/~3/79Zvs0u1WAM/</link>
		<comments>http://www.unixtutorial.org/2009/10/climate-change-how-you-can-help-prevent-it/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 00:14:35 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[bad2009]]></category>
		<category><![CDATA[blog action day]]></category>
		<category><![CDATA[climate change]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=614</guid>
		<description><![CDATA[Since it's Blog Action Day 2009 today, I'd like to remind all the readers of my blog how climate change can be prevented by following really simple rules. Since Unix Tutorial is a technical blog, I'll try and stay as technical as possible within the topic. Virtualize to consume less energy, get rid of old [...]]]></description>
			<content:encoded><![CDATA[<p>Since it's <a href="http://www.blogactionday.org"><strong>Blog Action Day 2009</strong></a> today, I'd like to remind all the readers of my blog how climate change can be prevented by following really simple rules.</p>
<p>Since <a href="http://www.unixtutorial.org">Unix Tutorial</a> is a technical blog, I'll try and stay as technical as possible within the topic.</p>
<h3>Virtualize to consume less energy, get rid of old hardware</h3>
<p>Old servers required a much bigger commitment in the past: not only did they cost a fortune, but they also needed a lot of space and required a lot of power. These days, 1u or 2u server solution can easily outperform a computing system which used to take a whole cabinet in your datacentre. And since the cost of supporting old hardware only increases with each year, it makes a lot of sense to simply but a new server to replace the old infrastructure.</p>
<p>If you're really big into the whole life cycle thing, an even better approach is to virtualize most of your systems. There are quite a few great solutions today &#8211; <strong> vSphere </strong>from <strong>VMware</strong>, <strong>Xen </strong>and <strong>KVM </strong>based virtualization from <strong>RedHat </strong>and the <strong>xVM </strong>family of virtualization solutions by Sun Microsystems (Oracle).</p>
<p>A ratio of 15 virtual machines per 1 physical server isn't that uncommon, which can give you an idea about the kind of improvement you'll get by following the route of virtualization.</p>
<p>The math is really simple: shut down 15 old servers, keep only 1 new server running &#8211; this means greatly reducing the amount of energy and therefore helping the planet stay green for a bit longer.</p>
<h3>Read from your screen, print less</h3>
<p>Perhaps on a much smaller scale, the issue of printing materials is also a direction you may want to explore if you're serious about helping the climate change prevention.</p>
<p>Many of us still print dozens of sheets of A4 paper a day. We print out emails and directions, man pages and screenshots &#8211; many of these to never be used again.</p>
<p>Start small and pay attention to every urge of yours to print something out. Ask yourself a few simple questions just to be sure that you absolutely need each piece of the information printed out.</p>
<p>As a Unix administrator, you should find ways to monitor your printing service. Even simple things like weekly stats of the top users printing stuff out might sometimes help you save really big on the paper and toner cost. Many users print stuff out without a certain reason for doing so &#8211; it's just their habit.</p>
<p>This means that if you're familiar with <strong>lpstat </strong>and <strong>lpadmin </strong>commands, you have a chance to help yourself and others become more aware of how much you're printing and what can be done to break your printing patters.</p>
<p>eInk-based book readers are a great alternative for those of you who claim they absolutely can't read off screen. It may be a while until A4-sized readers become widely available and affordable, but already you can get a book reader for just a few hundred dollars and this little device can be used for storing and reading of many books &#8211; all without much of an environmental impact, since you no longer need paper books.</p>
<h3>Use only what you need</h3>
<p>You'll be amazed how much can be saved if you run CPUs on your system at the speed sufficient to fulfill your computational needs instead of having everything running at 100% of their speed!</p>
<p>Many modern servers have power-awareness and intelligence built-in. I especially like blade server solutions &#8211; Dell, HP and Sun have all got a range of blade enclosures and blade servers on offer.</p>
<p>The beauty of using blades is that blade enclosures are extremely intelligent and configurable devices &#8211; you can use them to cap the power draw for your whole enclosure or a certain blade. Such power limitations will usually result in a lower performance, but for many solutions it's not critical at all. For example, if your blade hosts a FlexLM licenses server or serves web pages, it will be almost impossible to spot a performance difference even if you significantly lower the CPU speed.</p>
<p>Most operating systems support power management options. For desktops, this means ability to manage the speed of your cooling fans or the speed of your CPU which immediately has an impact. Sometimes you can also control your graphics card in the same manner. If you add screen blanking and hard drives management to this (configuring the sleep times for periods of long inactivity), you have all you need to reduce the power draw of your PC and ultimately help our planet stay the way it currently is or maybe even get refreshed over the next few years.</p>
<p>That's it for today! Sure enough, these tips may not seem to be all this climate change preventative, but trust me &#8211; we all have to  participate with however small steps and environmental improvements we can think of.</p>
<h3>See also:</h3>
<ul>
<li><a title="Blog Action Day" href="http://www.blogactionday.org">Blog Action Day website</a></li>
<li><a href="http://www.change.org">Change</a></li>
<li><a href="http://www.desktop-virtualization.com/tag/virtualbox/">Desktop Virtualization website</a></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=79Zvs0u1WAM:GvnGz8ud5xU:kdmuIyMabB4"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=kdmuIyMabB4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=79Zvs0u1WAM:GvnGz8ud5xU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=79Zvs0u1WAM:GvnGz8ud5xU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?i=79Zvs0u1WAM:GvnGz8ud5xU:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UnixTutorial/~4/79Zvs0u1WAM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/10/climate-change-how-you-can-help-prevent-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.unixtutorial.org/2009/10/climate-change-how-you-can-help-prevent-it/</feedburner:origLink></item>
		<item>
		<title>Ask me a Unix question on Twitter</title>
		<link>http://feedproxy.google.com/~r/UnixTutorial/~3/nNr0N_J97Eo/</link>
		<comments>http://www.unixtutorial.org/2009/10/ask-me-a-unix-question-on-twitter/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 09:07:19 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=611</guid>
		<description><![CDATA[Hi everyone, it seems to be really long since my last technical post here &#8211; too much stuff happening at work, plus I'm studying for a CCNA exam. If you're in need of quick help &#8211; drop me a message on Twitter &#8211; I'm UnixTutorial there. I can't promise a prompt reply, but at least [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone, it seems to be really long since my last technical post here &#8211; too much stuff happening at work, plus I'm studying for a <a rel=nofollow href="http://en.wikipedia.org/wiki/CCNA">CCNA</a> exam.</p>
<p>If you're in need of quick help &#8211; drop me a message on Twitter &#8211; I'm <a title="UnixTutorial @ Twitter" href="http://www.twitter.com/Unixtutorial">UnixTutorial</a> there. I can't promise a prompt reply, but at least this way you'll have some interactivity.</p>
<p>I see how many people leave questions in comments to my posts, and I don't always have the time to reply &#8211; so feel free to <a href="http://www.unixtutorial.org/contact/">send me an email</a> if you really need my help.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=nNr0N_J97Eo:bcv8jXHvt44:kdmuIyMabB4"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=kdmuIyMabB4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=nNr0N_J97Eo:bcv8jXHvt44:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=nNr0N_J97Eo:bcv8jXHvt44:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?i=nNr0N_J97Eo:bcv8jXHvt44:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UnixTutorial/~4/nNr0N_J97Eo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/10/ask-me-a-unix-question-on-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.unixtutorial.org/2009/10/ask-me-a-unix-question-on-twitter/</feedburner:origLink></item>
		<item>
		<title>Unix Tutorial membership – registration open for a week</title>
		<link>http://feedproxy.google.com/~r/UnixTutorial/~3/dBPER5Jhogo/</link>
		<comments>http://www.unixtutorial.org/2009/08/unix-tutorial-membership-registration-open-for-a-week/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 15:23:00 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=598</guid>
		<description><![CDATA[Hi everyone! I'm back from my holidays, and it's time to open the Unix Tutorial members area for new registrations once again! If you're still looking for a reason to become a member &#8211; please read the Becoming a Unix Tutorial member post. This time around, new users will receive a life-time access to just [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone!</p>
<p>I'm back from my holidays, and it's time to open the <a href="http://www.unixtutorial.org/members"><strong>Unix Tutorial members</strong></a> area for <a href="http://www.unixtutorial.org/ut/signup.php">new registrations</a> once again!</p>
<p>If you're still looking for a reason to become a member &#8211; please read the <a href="http://www.unixtutorial.org/2009/03/become-a-lifetime-unix-tutorial-member/">Becoming a Unix Tutorial member</a> post.</p>
<p>This time around, new users will receive a life-time access to just one course, the <strong>Unix foundations</strong> one. This is going to be a constantly updated and expanded course so I'm sure you'll benefit from revisiting it now and then. New courses added at a later stage will never be available for free: I plan to make them very specialized and will charge for access &#8211; more on this later.</p>
<p>Wait no more &#8211; here's your chance to join: <a href="http://www.unixtutorial.org/ut/signup.php">Unix Tutorial members sign-up</a>. I don't have nearly as much time to further develop the course, but please take time to leave a comment to this post or update a thread on the Unix Tutorial members discussion board about what exactly you're interested in.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=dBPER5Jhogo:XIAP3dFi98Q:kdmuIyMabB4"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=kdmuIyMabB4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=dBPER5Jhogo:XIAP3dFi98Q:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=dBPER5Jhogo:XIAP3dFi98Q:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?i=dBPER5Jhogo:XIAP3dFi98Q:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UnixTutorial/~4/dBPER5Jhogo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/08/unix-tutorial-membership-registration-open-for-a-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.unixtutorial.org/2009/08/unix-tutorial-membership-registration-open-for-a-week/</feedburner:origLink></item>
		<item>
		<title>Fixed calculations in Unix scripts</title>
		<link>http://feedproxy.google.com/~r/UnixTutorial/~3/nqZdtzupkfE/</link>
		<comments>http://www.unixtutorial.org/2009/06/fixed-point-calculations-in-unix-scripts/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 12:11:06 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Basic stuff]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[bc command]]></category>
		<category><![CDATA[calculations]]></category>
		<category><![CDATA[unix scripts]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=583</guid>
		<description><![CDATA[Although I've already shown you how to sum numbers up in bash, I only covered the bash way of doing it. I really like scripting with bash, but when it comes to calculations, there's quite a few important features missing from bash, and fixed point (thanks for the correction, Azrael Tod!) calculations is one of [...]]]></description>
			<content:encoded><![CDATA[<p>Although I've already <a title="arithmetic operations in Unix" href="http://www.unixtutorial.org/2008/06/arithmetic-operations-in-unix-scripts/">shown you how to sum numbers up in bash</a>, I only covered the bash way of doing it. I really like scripting with bash, but when it comes to calculations, there's quite a few important features missing from bash, and fixed point (thanks for the correction, <a href="http://g33ky.de/">Azrael Tod</a>!) calculations is one of them. Fortunately, <strong>bc command</strong> comes as a standard in most Unix distros, and can be used for quite complex calculations.</p>
<h3>Basic calculations with bc</h3>
<p><strong>bc </strong>is a very simple command. It takes standard input as an expression and then evaluates this, performing all the necessary calculations and showing you the result. Thus, to quickly sum numbers up or get a result of some other calculation, simply echo the expression and then pipe it out to the <strong>bc command</strong>:</p>
<pre>ubuntu$ <strong>echo "1+2" | bc</strong>
3</pre>
<p>Now, in scripts your calculations with <strong>bc </strong>are done quite similarly to what we did in <strong>bash</strong>. Here's an example:</p>
<pre>ubuntu$ <strong>NUMBER1=1</strong>
ubuntu$ <strong>NUMBER2=2</strong>
ubuntu$ <strong>SUM=$(echo "$NUMBER1+$NUMBER2"| bc)</strong>
ubuntu$ <strong>echo $SUM</strong>
3</pre>
<p>I told you these calculations would be basic, right? Now onto the more interesting stuff!</p>
<h3>Fixed point calculations with bc</h3>
<p>Most people learn about bash math limitations when they attempt to do a simple calculation but can't get the current answer with fixed point values. By default, all the operations happen with integers, and that's what you would get:</p>
<pre>ubuntu$ <strong>echo "1/2" | bc</strong>
0</pre>
<p>Now, if you expect 0.5 to be the result of dividing 1 by 2, you need to explain it to <strong>bc</strong>, because by default it doesn't show you any fractional part of the number.</p>
<p>The way you do this is quite simple: all you have to do is specify the number of digits you'd like to see  after the radix point of your result. For example, if I set this number to 5, I'll get <strong>bc </strong>to output the result of my calculation with 5 digits after the radix point. The special keyword to convey this intention to the <strong>bc</strong> command is called <strong>scale</strong>. Just specify the scale value and separate it from the rest of your expression by the semicolon sign:</p>
<pre>ubuntu$ <strong>echo "scale=5; 1/2" | bc</strong>
.50000</pre>
<p>Here's another example:</p>
<pre>ubuntu$ <strong>echo "scale=5; 0.16*10.79" | bc</strong>
1.7264</pre>
<p>Hope this answers your question! <strong>bc command</strong> is very powerful, so I'll definitely have to revisit it again in the future. For now though, enjoy the fixed point calculations and be sure to ask questions if you think I can help!</p>
<h3>See also:</h3>
<ul>
<li><strong><a title="summing numbers up" href="http://www.unixtutorial.org/2009/02/unix-scripts-how-to-sum-numbers-up/">Summing numbers up in Unix scripts</a></strong></li>
<li><strong><a title="basic unix math" href="http://www.unixtutorial.org/2008/06/arithmetic-operations-in-unix-scripts/">Basic math in Unix scripting</a></strong></li>
<li><strong><a title="unix scripts calculations" href="http://www.unixtutorial.org/2008/09/math-expressions-in-unix-scripts/">Another way of doing calculations in scripts</a><br />
</strong></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=nqZdtzupkfE:Ey97koSq3mM:kdmuIyMabB4"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=kdmuIyMabB4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=nqZdtzupkfE:Ey97koSq3mM:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=nqZdtzupkfE:Ey97koSq3mM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?i=nqZdtzupkfE:Ey97koSq3mM:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UnixTutorial/~4/nqZdtzupkfE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/06/fixed-point-calculations-in-unix-scripts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.unixtutorial.org/2009/06/fixed-point-calculations-in-unix-scripts/</feedburner:origLink></item>
		<item>
		<title>Command Aliases in Unix shells</title>
		<link>http://feedproxy.google.com/~r/UnixTutorial/~3/tFkxOiIvmnQ/</link>
		<comments>http://www.unixtutorial.org/2009/06/command-aliases-in-unix-shells/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 15:24:46 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Basic stuff]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=572</guid>
		<description><![CDATA[One of the really useful features almost every Unix shell has is support for command aliases &#8211; a way to run a command or a series of Unix commands using a shorter name you get associated with such commands. An example of a command alias in Unix shell Here's one of the most useful aliases [...]]]></description>
			<content:encoded><![CDATA[<p>One of the really useful features almost every Unix shell has is support for <strong>command aliases</strong> &#8211; a way to run a command or a series of Unix commands using a shorter name you get associated with such commands.</p>
<h3>An example of a command alias in Unix shell</h3>
<p>Here's one of the most useful aliases I have for Solaris systems:</p>
<pre>solaris$ <strong>alias ls='/usr/local/gnu/bin/ls --color -F'</strong></pre>
<p>What is allows me to do is to simply type "<strong>ls</strong>" instead of the really long command line it refers to: <strong>/usr/local/gnu/bin/ls &#8211;color -F</strong>.</p>
<p>You see, the <strong><a href="http://www.unixtutorial.org/commands/ls">ls command</a></strong> which is shipped with Solaris, doesn't have many options of the more up-to-date GNU ls command, and working with many Linux systems I quite like some of them like color highlighting of different directory objects &#8211; files, directories and executables.</p>
<p>Try typing the longer command a few times in a row, and compare it to the "ls" to get the idea of how much of a productivity gain one command alias can be!</p>
<h3>Why you should use command aliases</h3>
<p>Like many other things in Unix, aliases are a way to become more productive. The general rule of thumb is this: if you have to run some command something more than once every day &#8211; consider creating an alias for it. These are just a few cases where it makes sense to employ them:</p>
<ul>
<li>if you repeatedly check whether some files exist or get updated</li>
<li>if you're monitoring a certain aspect of your OS and you get the values using grep command</li>
<li>if you're connecting to the same hosts using rsh or ssh</li>
</ul>
<p>All of these and many more examples are greatly simplified if you alias them to some shorter commands.</p>
<h3>Creating new aliases in bash</h3>
<p>Setting up a new alias is quite easy, the syntax for <strong>alias command</strong> is very straightforward. Let's say I want to automate the confirmation of swap usage based on a <strong>free command</strong> in Linux:</p>
<pre>redhat$ <strong>free</strong>
total       used       free     shared    buffers     cached
Mem:       2075156     945712    1129444          0     177292     503416
-/+ buffers/cache:     265004    1810152
Swap:      2040244          0    2040244</pre>
<p>The result I'm after is this command:</p>
<pre>redhat$ <strong>free | grep Swap</strong>
Swap:      2040244          0    2040244</pre>
<p>And here's how I can create an alias called "swp" which refers to this series of commands:</p>
<pre>redhat$ <strong>alias swp='free | grep Swap'</strong></pre>
<p>Once you execute this command, you can start using swp as a Unix command:</p>
<pre>redhat$ <strong>swp</strong>
Swap:      2040244          0    2040244</pre>
<p><strong>Important:</strong> such a creation of new aliases is going to be only active for your current Unix shell and sub-shells you may spawn. To make your alias permanent, you'll have to update one of your initialization scripts like. For Linux and bash, you should add the same alias command to your <strong>.bashrc</strong> file.</p>
<h3>Removing aliases in Unix</h3>
<p>In very much the same way, you can use the unalias command to get rid of a certain alias. The nature of this command is such that you'll most likely use it when creating and debugging new aliases. It's unlikely that you'll need to use it in your initialization scripts.</p>
<p>Following the example above, here's how to get rid of the swp alias and verify that it's gone:</p>
<pre>redhat$ <strong>unalias swp</strong>
redhat$ <strong>swp</strong>
bash: swp: command not found</pre>
<h3>How to list your current aliases</h3>
<p>If you run the alias command without any parameters, you'll be shown a full list of aliases currently configured for your user account, here's an example from one of my systems:</p>
<pre>l.      ls -d .* --color=tty
ll      ls -l --color=tty
ls      ls --color=tty
vi      vim</pre>
<p>That's it for today! Stay tuned for a follow-up post which will share some of the examples for command aliases in Unix. If you have some &#8211; please leave a comment so that I can share it with others!</p>
<h3>See also:</h3>
<ul>
<li><strong><a title="ls unix command" href="http://www.unixtutorial.org/commands/ls">Unix commands: ls</a></strong></li>
<li><strong><a title="Listing directories" href="http://www.unixtutorial.org/2008/04/how-to-list-directories-in-a-directory-in-unix/">List directories in a given directory</a></strong></li>
<li><strong><a title="what symlink points to" href="http://www.unixtutorial.org/2008/03/how-to-find-what-symlink-points-to/">How to find what symlink points to</a><br />
</strong></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=tFkxOiIvmnQ:wnFeXHEKB8U:kdmuIyMabB4"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=kdmuIyMabB4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=tFkxOiIvmnQ:wnFeXHEKB8U:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=tFkxOiIvmnQ:wnFeXHEKB8U:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?i=tFkxOiIvmnQ:wnFeXHEKB8U:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UnixTutorial/~4/tFkxOiIvmnQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/06/command-aliases-in-unix-shells/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.unixtutorial.org/2009/06/command-aliases-in-unix-shells/</feedburner:origLink></item>
		<item>
		<title>Ubuntu SSH: How To Enable Secure Shell in Ubuntu</title>
		<link>http://feedproxy.google.com/~r/UnixTutorial/~3/7PE3GNuOGyE/</link>
		<comments>http://www.unixtutorial.org/2009/05/ubuntu-ssh-how-to-enable-secure-shell-in-ubuntu/#comments</comments>
		<pubDate>Fri, 15 May 2009 15:38:54 +0000</pubDate>
		<dc:creator>Gleb Reys</dc:creator>
				<category><![CDATA[Basic stuff]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[openssh]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh server]]></category>

		<guid isPermaLink="false">http://www.unixtutorial.org/?p=566</guid>
		<description><![CDATA[SSH (Secure SHell) is possibly the best way to remotely access a Unix system &#8211; it's very secure thanks to automatic encryption of all the traffic, and it's also quite universal because you can do all sorts of things: access remote command line shell, forward graphics session output, establish network tunnels and set up port [...]]]></description>
			<content:encoded><![CDATA[<p><strong>SSH </strong>(<strong>Secure SHell</strong>) is possibly the best way to remotely access a Unix system &#8211; it's very secure thanks to automatic encryption of all the traffic, and it's also quite universal because you can do all sorts of things: access remote command line shell, forward graphics session output, establish network tunnels and set up port redirections. Today I'm going to show you how to get started with SSH in <strong>Ubuntu</strong>.</p>
<h3>Installing SSH server in Ubuntu</h3>
<p>By default, your system will have no SSH service enabled, which means you won't be able to connect to it remotely using SSH protocol (TCP port 22). This means that installing SSH server will be one of the first post-install steps on your system.</p>
<p>The most common SSH implementation is <a href="http://www.openssh.org"><strong>OpenSSH</strong></a> server, and that's exactly what you want to install.</p>
<p>Log in with your standard username and password, and run the following command to install openssh-server. You should be using the same username that you specified when installing Ubuntu, as it will be the only account with sudo privileges to run commands as root:</p>
<pre>ubuntu$ <strong>sudo apt-get install openssh-server
</strong>[sudo] password for greys:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  rssh molly-guard openssh-blacklist openssh-blacklist-extra
The following NEW packages will be installed:
  openssh-server
0 upgraded, 1 newly installed, 0 to remove and 75 not upgraded.
Need to get 285kB of archives.
After this operation, 782kB of additional disk space will be used.
Get:1 http://ie.archive.ubuntu.com jaunty/main openssh-server 1:5.1p1-5ubuntu1 [
285kB]
Fetched 285kB in 0s (345kB/s)
Preconfiguring packages ...
Selecting previously deselected package openssh-server.
(Reading database ... 101998 files and directories currently installed.)
Unpacking openssh-server (from .../openssh-server_1%3a5.1p1-5ubuntu1_i386.deb) .
..
Processing triggers for ufw ...
Processing triggers for man-db ...
Setting up openssh-server (1:5.1p1-5ubuntu1) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
 * Restarting OpenBSD Secure Shell server sshd                           [ OK ]</pre>
<h3>Verifying your SSH server works</h3>
<p>While you're still on your local desktop session, you can use the ps command to confirm that SSH daemon (<strong>sshd</strong>) is running:</p>
<pre>ubuntu$ <strong>ps -aef | grep sshd
</strong>root     24114     1  0 15:18 ?        00:00:00 /usr/sbin/sshd</pre>
<p>Now that you see it's there, it's time to try connecting:</p>
<pre>ubuntu$ <strong>ssh localhost</strong></pre>
<p>Since this is the first time you're trying to connect using SSH, you'll have to answer yes to the following question:</p>
<pre>The authenticity of host 'localhost (::1)' can't be established.
RSA key fingerprint is 18:4d:96:b3:0d:25:00:c8:a1:a3:84:5c:9f:1c:0d:a5.
Are you sure you want to continue connecting (yes/no)? yes</pre>
<p>&#8230; you'll then be prompted for your own password (remember, the system treats such connection request as if you were connecting remotely, so it can't trust you without confirming your password):</p>
<pre>Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
greys@localhost's password:</pre>
<p>.. and finally you'll see the usual Ubuntu (Jaunty in this example) banner and prompt:</p>
<pre>Linux ubuntu 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To access official Ubuntu documentation, please visit:

http://help.ubuntu.com/

Last login: Fri May 15 15:18:34 2009 from ubuntu
ubuntu$</pre>
<p>That's it, providing you have your networking configured and you know your IP address or hostname, you can start connecting to your Ubuntu box from remote systems, using the same command.  Enjoy!</p>
<h3>See also:</h3>
<ul>
<li><strong><a href="http://www.unixtutorial.org/commands">Unix commands</a></strong></li>
<li><strong><a title="apt-get behind proxy" href="http://www.unixtutorial.org/2007/09/how-to-use-apt-get-behind-proxy/">Using apt-get behind proxy</a></strong></li>
<li><strong><a title="list packages in Ubuntu" href="http://www.unixtutorial.org/2008/09/list-installed-packages-on-your-ubuntu-linux/">List installed packages in Ubuntu</a><br />
</strong></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=7PE3GNuOGyE:mXZFYqV3XZw:kdmuIyMabB4"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=kdmuIyMabB4" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=7PE3GNuOGyE:mXZFYqV3XZw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/UnixTutorial?a=7PE3GNuOGyE:mXZFYqV3XZw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/UnixTutorial?i=7PE3GNuOGyE:mXZFYqV3XZw:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/UnixTutorial/~4/7PE3GNuOGyE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.unixtutorial.org/2009/05/ubuntu-ssh-how-to-enable-secure-shell-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.unixtutorial.org/2009/05/ubuntu-ssh-how-to-enable-secure-shell-in-ubuntu/</feedburner:origLink></item>
	</channel>
</rss>
