Friday, December 5, 2008

How to configure network interfaces in ubuntu server

Ubuntu server runs in text mode by default. to setup IP Adress of LAN cards by using command line you can follow following steps:
open network interfaces file by typing:
sudo vim /etc/network/interfaces
in the files you may have no. of lines written in it. we may set all the interfaces in it. a sample for the same is as follows:
auto eth0
iface eth0 inet dhcp


"auto" keyword is to detect the ethernet card automatically when the system boots.
the second line here tells that ip address will be configured automatically from dhcp.
if we want to configure the ip address permanently or staticaly then we have to write the lines similar to following:
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.254


after writing these lines close the file by saving it . to save a file in vi editor , after completion of file press Esc and then press 'w' and then 'q'.
then to configure the newly assigned addresses restart the network services by writing:
sudo /etc/init.d/networking restart
check for the output status. it should not give any error.
now your system is in network. use ping command to check connectivity.

How to Install graphics/ ubuntu desktop on Ubuntu server

Ubuntu server does not provide graphical user interface(By default) after installation. To enable graphics in ubuntu server we have to install a package called ubuntu-dektop. This package makes ready the system to be used in Graphical enviornment. To install it you should have the package in ubuntu server CD/DVD or have an internet connection. if you have package in CD/DVD then insert it in drive and then run following command:
sudo apt-get install ubuntu-desktop
before running command make in ensure that you have uncommented(if any) the sources for update and install. if you have not checked then edit it in vi editor by using following command
sudo vim /etc/apt/sources.list
check for all the lines mentioning sources and remove symbol hash(#) in front of them, if any.
save the file and exit and run the command to install ubuntu-desktop.
The package get installed in few minutes (depending upon the speed of your source media/Internet).
Restart the system. System will work in Graphics mode after restart