Change Network Settings in Slackware



Hostname
To change the default hostname darkstar to something else, simply edit your /etc/HOSTNAME file. You probably don't have a domain of your own so the example.net can be replaced with something like home.

IP Address
Look in /etc/rc.d/rc.inet1.conf

The comments at the top of that file explain what you need to do. Either:
- set IPADDR and NETMASK, or
- set USE-DHCP to yes
Leave the DHCP_HOSTNAME alone.

Default Gateway
If you don't use DHCP, at the bottom of the /etc/rc.d/rc.inet1.conf file there is a GATEWAY field. Put it in there

Hosts file
Very much like the windows hosts file. A normal /etc/hosts will look like this:

127.0.0.1               localhost.localdomain localhost
127.0.0.1               mycomp.home mycomp

DNS Information
The /etc/resolv.conf has a couple of things:

nameserver 10.0.0.1
search somedomain.com otherdomain.com

The first is obviously the address of your DNS server.

The second (optional) field is a list of domains that will be searched when you provide a hostname. For example if somesvr.somedomain.com is a webserver and you type somesvr in your browser's address bar, somesvr.somedomain.com will be found.

Hopefully this will get you going.

鲁ICP备16011799号-8