LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to connect to network from command line (http://www.linuxquestions.org/questions/linux-general-1/how-to-connect-to-network-from-command-line-917548/)

rng 12-07-2011 05: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 05:53 AM

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

rng 12-07-2011 07: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 07: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. https://help.ubuntu.com/10.04/server...iguration.html

Stephen Morgan 12-07-2011 11:08 AM

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

rng 12-07-2011 07: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:

http://manpages.ubuntu.com/manpages/...1/nmcli.1.html

I am using ubuntu version 10.04 LTS.

phatmack 12-07-2011 07:27 PM

Found the following info here: http://ubuntuforums.org/showthread.php?t=1678256
Quote:

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 12:08 AM

Thanks.

onebuck 12-08-2011 07:33 AM

Member response
 
Hi,

Quote:

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;
Quote:

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

SYNOPSIS
links [options] URL

DESCRIPTION
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.
...
...
SEE ALSO
lynx(1), w3m(1)
Or lynx;
Quote:

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

SYNOPSIS
lynx [options] [path or URL]

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

DESCRIPTION
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.
HTH!


All times are GMT -5. The time now is 12:23 PM.