M HYPE SPLASH
// updates

How to connect to internet in fresh installed ubuntu 12.04 server

By John Campbell

I have installed fresh ubuntu server 12.04 LTS(only command line and GUI is not available) and want to connect to internet for some project work on snort please help me what to do next?

3 Answers

Do you want to connect over Ethernet? In that case you should try this:

sudo ifconfig eth0 up
sudo dhclient eth0

If this dosen't work try eth1,2, etc. Or you can get a list of interface names by typing:

ifconfig
2

Networking should be enabled by default. You can check this by looking at the output of the command:

ip route 

and

ifconfig

Normally you should see your network connection in ifconfig and default from the ip route command gives you connection to the internet. If you can not find your network adaptor in ifconfig and there is no default route in ip route, then there is something wrong and more data is needed.

However, I presume from the way you ask the question that your actually question might be how to browse the internet when no GUI is available. A server is not meant to do browsing, so by default no browser is installed. You can install a text based browser for very simple browsing by the command

sudo apt-get install links

Now you can browse by using the command

links 

For proper browsing you will need firefox or something, which requires a graphical environment. Thought apt will probably sort out some kind of solution when you do

sudo apt-get install firefox

, you then need to start a graphical x-session by hand and tell firefox to use this. But bottom line, if you want to browse the internet, you install a desktop system and let it execute some server tasks. If your server tasks are too demanding to be executed by a desktop system, you install a server and use a different system to browse the internet.

Networking is setup by default in your installation. Do you have a wired connection to an Internet-connected router that provides you with an IP address or do you have wireless? IN the former case it 'should just work' in the latter case you might want to review the answer to how to configure wireless using the commandline only.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy