<?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>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; hostname</title> <atom:link href="http://www.ghacks.net/tag/hostname/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Sat, 11 Feb 2012 09:52:46 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>How do I find my network information &#8211; in Linux?</title><link>http://www.ghacks.net/2010/04/20/how-do-i-find-my-network-information-in-linux/</link> <comments>http://www.ghacks.net/2010/04/20/how-do-i-find-my-network-information-in-linux/#comments</comments> <pubDate>Mon, 19 Apr 2010 23:46:32 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[dns]]></category> <category><![CDATA[Gateway]]></category> <category><![CDATA[hostname]]></category> <category><![CDATA[IP address]]></category> <category><![CDATA[linux networking]]></category> <category><![CDATA[network information]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=24724</guid> <description><![CDATA[Taking a cue from Martin&#8217;s helpful article (see &#8220;How do I find my IP Address&#8220;) I thought it would be a good idea to offer the same information for the Linux operating system. But with Linux there is one issue to get around &#8211; that of the number of different tools available to use to [...]]]></description> <content:encoded><![CDATA[<p>Taking a cue from Martin&#8217;s helpful article (see &#8220;<a
title="How do I find my network information - in Linux?" href="http://www.ghacks.net/2010/04/19/how-do-i-find-my-ip-address/" target="_blank">How do I find my IP Address</a>&#8220;) I thought it would be a good idea to offer the same information for the Linux operating system. But with Linux there is one issue to get around &#8211; that of the number of different tools available to use to find this information. Because there are so many graphical tools with which to find networking information, I thought it would be best to simply tackle this with everyone&#8217;s favorite tool &#8211; the command line.</p><p>In this article I will show you how to find out various networking information on your Linux system. All of these tasks can be handled by any skill level of user, so don&#8217;t think you have to be an ubergeek, hacker-type in order to gain this information.</p><p><span
id="more-24724"></span><strong>IP Address</strong></p><div
id="attachment_24725" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/04/linux_ip_info.png"><img
class="size-medium wp-image-24725 " src="http://www.ghacks.net/wp-content/uploads/2010/04/linux_ip_info-500x351.png" alt="" width="300" height="211" /></a><p
class="wp-caption-text">Figure 1</p></div><p>Let&#8217;s start off with the IP Address. Of course, before you do anything, you need to open up a terminal window. Once you have that open you can then issue the necessary command. The command for finding your IP Address is <em>ifconfig. </em>When you issue this command you will receive information for every network connection you have available. Most likely you will see information for both the loopback (lo) and your wired network connection (eth0). If you have a wireless connection that will be listed, most likely, as wlan0. The reported information will look like that shown in Figure 1. As you can see, you not only get the IP Address, but the Broadcast address, the Subnet Mask, and the IPv6 Address.</p><p><strong>Hostname</strong></p><p>From that same command line, if you enter the command <em>hostname </em>you will see the actual hostname of your machine. In the case of my test machine, I see <em>Ubuntu-desktop</em>.  For more information on using this command, take a look at my article &#8220;<a
title="Set your hostname in Linux" href="http://www.ghacks.net/2009/07/06/set-your-hostname-in-linux/" target="_blank">Set your hostname in Linux</a>&#8220;.</p><p><strong>DNS Address(es)</strong></p><p>There is no actual command to see your DNS addresses. You don&#8217;t really need one. All you need to do is examine the <strong>/etc/resolv.conf</strong> file with the command <em>less /etc/resolv.conf, </em>at whichpoint you will see something like:</p><p><em>nameserver 208.67.222.222</em></p><p><em>nameserver 208.67.220.220</em></p><p><strong>Gateway address</strong></p><div
id="attachment_24726" class="wp-caption alignright" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/04/linux_gateway.png"><img
class="size-medium wp-image-24726 " src="http://www.ghacks.net/wp-content/uploads/2010/04/linux_gateway-500x351.png" alt="" width="300" height="211" /></a><p
class="wp-caption-text">Figure 2</p></div><p>Now let&#8217;s find out what the Gateway address is. The command used for this is the <em>netstat</em> command. This command does quite a bit more than just discover your gateway. What the netstat command does is print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. But to find the gateway address you would issue the command <em>netstat -nr </em>and you will see something like that shown in Figure 2. You can probably guess it, but the Gateway address is 192.168.1.1. The flags you used in that command are <em>n </em>(for numeric addresses) and <em>r </em>(for route).</p><p>Of course the netstat command can do much more than that (we&#8217;ll cover that in another article).</p><p><strong>Final thoughts</strong></p><p>Yes, there are a lot of tools that can be used in Linux. It all depends upon how you want to get your information. In both the GNOME and KDE desktops there are outstanding GUI tools you can use for all of this. But knowing the command line route makes you much more versatile.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/04/20/how-do-i-find-my-network-information-in-linux/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>Set your hostname in Linux</title><link>http://www.ghacks.net/2009/07/06/set-your-hostname-in-linux/</link> <comments>http://www.ghacks.net/2009/07/06/set-your-hostname-in-linux/#comments</comments> <pubDate>Mon, 06 Jul 2009 16:24:16 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[hostname]]></category> <category><![CDATA[setting hostname]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=13715</guid> <description><![CDATA[If you are an administrator then you know what a hostname is. If you are not an administrator then you should know the hostname of a computer is the name which a network attached device is known. Unless you have manually changed your hostname, or set it up during installation, your hostname will most likely [...]]]></description> <content:encoded><![CDATA[<p>If you are an administrator then you know what a hostname is. If you are not an administrator then you should know the hostname of a computer is the name which a network attached device is known. Unless you have manually changed your hostname, or set it up during installation, your hostname will most likely be &#8220;localhost.localdomain&#8221;.</p><p>Hostnames are most often used for administrative habits. In other words hostnames will show up in some scanning applications, can be used for name to IP address resolution, and much more. But to make this useful you will have to manually set your hostname on your Linux machine. This article will show you just how to do that.</p><p><span
id="more-13715"></span><strong>Find your hostname</strong></p><p>The most common means to find your host name is to open up a terminal window and enter the command:</p><p><em>hostname</em></p><p>If you have not set your hostname, more than likely you will see returned:</p><p><em>localhost.localdomain</em></p><p>A quick and easy way to spot if you have not changed your hostname is to check when you open up your terminal window. At your bash prompt you will see something like:</p><p><code>[jlwallen@localhost ~]$</code></p><p>As you can see a portion of the hostname (everything preceding the first &#8220;.&#8221;) will be used in your prompt. In the example you see above you see &#8220;localhost&#8221; which should tell you the hostname has not been changed.</p><p><strong>Temporarily changing your hostname</strong></p><p>You can temporarily change your hostname by issuing a single command. You have to issue this command either using sudo or as the root user. To make this change you will use the same command you used to find out your hostname, only you will include the new hostname to the command. Say you want to change your hostname to &#8220;willow&#8221;. To make this change temporarily issue the command:</p><p><em>hostname willow</em></p><p>Now issue the command <em>hostname</em> which should report back:</p><p><strong>willow</strong></p><p>This change will last until you reboot your machine.</p><p><strong>Permanently changing your hostname</strong></p><p>How you permanently change your hostname will depending upon which distribution you use. We&#8217;ll examine making this change on both a Ubuntu system and a Fedora system. First Ubuntu.</p><p>On a Ubuntu system there is a file called <strong>/etc/hostname</strong>. The contents of this file will have a single line containing the hostname of your machine. Open up this file in your favorite editor, delete the default hostname, add your desired hostname, and save the file. To make this chang take effect issue the command:</p><p><em>/etc/init.d/hostname.sh start</em></p><p>This hostname will remain intact upon reboot.</p><p>Now to change your hostname in Fedora. This is taken care of in the <strong>/etc/sysconfig/network </strong>file. The default contents of this file will look like:</p><p><code>NETWORKING=yes<br
/> HOSTNAME=localhost.localdomain</code></p><p>Erase the &#8220;localhost.localdomain&#8221; portion and change that to reflect the hostname you want. Once you have made this change save the file. Once you have made this change issue the following command (as the root user):</p><p><em>/etc/rc.d/rc.sysinit</em></p><p>For the change to take effect.</p><p><strong>Final thoughts</strong></p><p>With your hostname changed applications like <a
title="Lanmap" href="http://www.ghacks.net/2009/06/19/map-your-network-with-lanmap/" target="_blank">Lanmap</a> will now be easier to use because machines will have unique names. This change will also make administering your systems easier because you will have set machine hostnames to reflect either the user of the machine or the machines&#8217; job.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/07/06/set-your-hostname-in-linux/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> </channel> </rss>
