Link to home
Start Free TrialLog in
Avatar of jaisonshereen
jaisonshereen

asked on

How to assign ip in ubundu ?

How i can assign Ip and change hostname in ubundu ?
i dont have any root password with me.
SOLUTION
Avatar of http:// thevpn.guru
http:// thevpn.guru
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jaisonshereen
jaisonshereen

ASKER

sudo also asking for root password
SOLUTION
Avatar of rindi
rindi
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks that is working fine ..kindly let me know what files need to be edited for assigning IPs
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@agriesser:

Thanks alot for your great answer . .

1.) No need to `ifdown eth0` when assigning a new ip address
Is that the same for the subnet mask?

2.) The ifconfig command does not work, it needs to read:

     ifconfig eth0 xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx up

Yup! sorry for the typo, instead of netmask I wrote subnet!

3.) using ifconfig instead of your distributions network configuration files will not survive reboots
Yes, forgot to say that, but it comes in quite handy when you change the gateway from the configuration files and don't want to reboot, so you change in the configuration file for permanent effect, and use the route command for instantaneous effect.

4.) The route command does not set a default gateway (syntax wrong), it should read:

     route add default gw xxx.xxx.xxx.xxx

Sorry, I coming from the world of Solaris with this command, and I'm quite sure it works there.

Last but not least, I apologize for my intrusion in the world of Ubunto with commands from Solaris and RHEL.
Errr, Chill out?