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?
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
2, etc. Or you can get a list of interface names by typing:
Networking should be enabled by default. You can check this by looking at the output of the command:
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
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.