Gentoo

by admin on August 13, 2009 · 0 comments

Changing Hostname Temporarly

Example: hostname newhostname.com

Changing Hostname Permanently

Edit the file /etc/conf.d/hostname and change the value in it, Save and exit

To avoid dns errors edit the file /etc/hosts and create a line as below
192.168.1.50 newhostname alias
Change ip with your server ip and newhostname and alias with anything you have setup

Changing/Setting main ip

Edit the file /etc/conf.d/net and change the IP and Gateway in it.
Example net file:
config_eth0=(
25.35.25.12/24
25.35.25.13/24
)
routes_eth0=( “default gw 25.35.25.1″ )

Description: Dont forget to restart network after the change with below command
/etc/rc.d/net.eth0 restart
Connect again using new ip if all is well.

Adding more IPs

Simply add more ips in /etc/conf.d/net

config_eth0=(
25.35.25.12/24
25.35.25.13/24
25.35.25.14/24
25.35.25.15/24
25.35.25.16/24
25.35.25.17/24
)
routes_eth0=( “default gw 25.35.25.1″ )

Previous post:

Next post: