-   Linux - General (
-   -   How to connect to network from command line (

rng 12-07-2011 06:44 AM

How to connect to network from command line
In ubuntu top panel, on the right side, there is an indicator showing network status. I click on that and choose the network option (which has ip address, gateway etc) and it connects.

Can I do the same thing from command line?

Thanks for your help.

acid_kewpie 12-07-2011 06:53 AM

you want to see your network settings? try "ifconfig -a" and "route -n" for starters.

rng 12-07-2011 08:02 AM

Thanks for your interest. I do not want to see network settings. I want to connect to internet using the values of ip address, netmask and broadcast that I have. How can I do it?

acid_kewpie 12-07-2011 08:16 AM

well on an ethernet network you don't "connect to the internet", you just set up your ip routing correctly etc.

plenty of standard documentation around though if you look, e.g.

Stephen Morgan 12-07-2011 12:08 PM

Ubuntu uses Network Manager, there's a command line interface called nmcli, you should be able to connect using that.

rng 12-07-2011 08:16 PM

I tried command 'nmcli' - there is no such command on my system. I also could not find any nmcli program in synaptic package manager. Though the command is there in ubuntu manpages:

I am using ubuntu version 10.04 LTS.

phatmack 12-07-2011 08:27 PM

Found the following info here:

You need the lastest netwotk-manager (0.8.1):

sudo add-apt-repository ppa:network-manager/trunk
sudo apt-get update && sudo apt-get upgrade
Hope it helps!

rng 12-08-2011 01:08 AM


onebuck 12-08-2011 08:33 AM

Member response


Originally Posted by rng (Post 4544193)
Thanks for your interest. I do not want to see network settings. I want to connect to internet using the values of ip address, netmask and broadcast that I have. How can I do it?

If you wish to connect and browse from the cli then look at links;

excerpt from man links:
links - lynx-like alternative character mode WWW browser

links [options] URL

links is a text mode WWW browser with ncurses interface, supporting colors, correct table render-
ing, background downloading, menu driven configuration interface and slim code.

Frames are supported. You can have different file formats associated with external viewers.
mailto: and telnet: are supported via external clients.

links can handle local (file://) or remote (http:// or ftp://) URLs.
lynx(1), w3m(1)
Or lynx;

excerpt from man lynx;
lynx - a general purpose distributed information browser for the World Wide Web

lynx [options] [path or URL]

use "lynx -help" to display a complete list of current options.

Lynx is a fully-featured World Wide Web (WWW) client for users running cursor-addressable,
character-cell display devices (e.g., vt100 terminals, vt100 emulators running on Windows 95/NT
or Macintoshes, or any other "curses-oriented" display). It will display hypertext markup
language (HTML) documents containing links to files residing on the local system, as well as
files residing on remote systems running Gopher, HTTP, FTP, WAIS, and NNTP servers. Current
versions of Lynx run on Unix, VMS, Windows 95/NT, 386DOS and OS/2 EMX.

Lynx can be used to access information on the World Wide Web, or to build information systems
intended primarily for local access. For example, Lynx has been used to build several Campus
Wide Information Systems (CWIS). In addition, Lynx can be used to build systems isolated within
a single LAN.
If you wish to change device connection configuration from the cli then look at curses based 'wicd' or manually use 'ifconfig', 'route' and change/add DNS to '/etc/resolv.conf'.

FYI: I suggest that you look at 'How to Ask Questions the Smart Way' so in the future your queries provide information that will aid us in diagnosis of the problem or query.

All times are GMT -5. The time now is 10:06 AM.