<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Ray Heffer &#187; iptables</title>
	<atom:link href="http://www.rayheffer.com/tag/iptables/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rayheffer.com</link>
	<description>Enterprise Technologies</description>
	<lastBuildDate>Sat, 04 Feb 2012 17:51:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Linux commands and tips</title>
		<link>http://www.rayheffer.com/125/linux-commands-and-tips/</link>
		<comments>http://www.rayheffer.com/125/linux-commands-and-tips/#comments</comments>
		<pubDate>Thu, 07 Jul 2005 12:41:30 +0000</pubDate>
		<dc:creator>Ray Heffer</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Scripts & Commands]]></category>
		<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[hosts]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[makemap]]></category>
		<category><![CDATA[nameserver]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[resolv]]></category>
		<category><![CDATA[sendmail]]></category>
		<category><![CDATA[uname]]></category>

		<guid isPermaLink="false">http://wp.rayheffer.com/?p=125</guid>
		<description><![CDATA[Checking kernel &#38; CentOS version To check which kernel version you are running use uname -r # uname -r To find out which CentOS (or RedHat) release is installed have a look at /etc/redhat-release # cat /etc/redhat-release Checking Disk Space To check disk space used / free use the df command and it will display [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rayheffer.com%2F125%2Flinux-commands-and-tips%2F" onclick="pageTracker._trackPageview('/outgoing/api.tweetmeme.com/share?url=http_3A_2F_2Fwww.rayheffer.com_2F125_2Flinux-commands-and-tips_2F&amp;referer=');"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rayheffer.com%2F125%2Flinux-commands-and-tips%2F&amp;source=rayheffer&amp;style=normal&amp;service=TinyURL.com&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><strong><img class="size-full wp-image-376 alignright" title="Linux Tips" src="http://www.rayheffer.com/wp-content/uploads/2010/02/Programming.png" alt="" width="128" height="128" />Checking kernel &amp; CentOS version</strong></p>
<p>To check which kernel version you are running use <code>uname -r</code></p>
<p><code># uname -r</code></p>
<p>To find out which CentOS (or RedHat) release is installed have a look at <code>/etc/redhat-release</code></p>
<p><code># cat /etc/redhat-release </code></p>
<p><strong>Checking Disk Space</strong></p>
<p>To check disk space used / free use the <code>df </code>command and it will display each volume. The <code>-h</code> switch turns the bytes reading into GB to make it more readable.</p>
<p><code># df -h</code></p>
<p>If you want to check the size of a particular directory then use:</p>
<p><code># du -sh /</code><br />
<span id="more-125"></span></p>
<p><strong>Configuring DNS Settings</strong></p>
<p>To configure which DNS servers your Linux server will use you need to edit <code>/etc/resolv.conf</code></p>
<p><code># vi /etc/resolv.conf</code></p>
<p>Just add each name server as a new line as in the following example:</p>
<p><code>nameserver<br />
nameserver </code></p>
<p><strong>Changing the hostname</strong></p>
<p>You&#8217;ll find the hostname of the server in two places: <code>/etc/hosts</code> and <code>/etc/sysconfig/network</code>.</p>
<p><code># vi /etc/hosts</code></p>
<p>and</p>
<p><code># vi /etc/sysconfig/network</code></p>
<p><strong>Show Processor &amp; Memory Usage</strong></p>
<p>This is equivilant to the Windows Task Manager, and will show each process and the consumed CPU and RAM usage. Very useful!</p>
<p><code># top</code></p>
<p><strong>Show Processor Information</strong></p>
<p>This command will display the processor type and speed.</p>
<p><code># cat /proc/cpuinfo</code></p>
<p><strong>Search command history for old commands you have forgotten!</strong></p>
<p>Use the history command with <code>grep</code> to find previously entered commands.</p>
<p><code># history | grep <em>command</em></code></p>
<p><strong>Compiling sendmail.mc</strong></p>
<p><code># m4 /etc/mail/sendmail.mc &gt; /etc/mail/sendmail.cf</code></p>
<p><strong>Updating virtusertable.db from /etc/mail/virtusertable</strong></p>
<p><code># makemap hash /etc/mail/virtusertable.db &lt; /etc/mail/virtusertable</code></p>
<p><strong>Saving IPTABLES to /etc/sysconfig/iptables</strong></p>
<p><code># iptables-save &gt; /etc/sysconfig/iptables</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rayheffer.com/125/linux-commands-and-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
