LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-19-2012, 01:36 PM   #1
newbiesforever
Senior Member
 
Registered: Apr 2006
Location: Iowa
Distribution: Debian distro family
Posts: 2,373

Rep: Reputation: Disabled
can't find software to connect to network from CL


I know how to connect to my wireless network only from a GUI with Networkmanager or Wicd, and have never known how to connect from a command line. I'm trying to teach myself according to the instructions I found here: http://www.ghacks.net/2009/04/14/con...-command-line/

I seem to be missing some of the software needed for this, and can't find it in the apt repositoriesd (possibly because I wasn't looking for the right packages).

"ifconfig wlan0 up" worked as expected, but when I entered iwlist wlan0 scan, the terminal says "command not found." (I didn't need to enter that, because I already know the network's available; I was just practicing every command listed.)

Then I entered "iwconfig wlan0" with my network ID and the WPA passphrase in double quotation marks. The terminal says command not found, so...I guess I don't have iwconfig either.

Finally, it didn't recognize "dhclient wlan0" either.

I don't see iwconfig or dhclient in my repositories. Are they contained in some other package? I guessed iwconfig might be contained in the package iw, but I installed that and still don't have iwconfig.
 
Old 05-19-2012, 03:07 PM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,213

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
The commands you think you do not have are privileged commands and need to be run as root. Use sudo, if your system is set up for sudo.

If you want to find the binaries, open a konsole, and as root run the command 'updatedb' ( without the quotes ) and let the command finish. If you have never used it, depending on your system speed, it will take a minute or two to complete. Then you can use the
'locate ifconfig' to find the path the the bin file. If nothing happens for the locate command, after you do the updatedb command, then you do not have the file. I'm sure you have all three, otherwise things would not work with network manager.
 
Old 05-19-2012, 04:34 PM   #3
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Usually, you won't have permissions for those commands or they won't be in your path (or, both).

Quote:
...'updatedb'...
Usually, you don't have to run updatedb (it usually runs silently in the background, say, once every 24 hours), unless you have just installed the thing that you are looking for (when you will have to run updatedb as root, otherwise you'll just get streams of errors, for the files for which an ordinary user does not have permissions).

Note, from here wicd can be used from the command line. And according to this, there is nmcli, a built in command line interface. So, either WiCD or NM can be used from the command line.
 
Old 05-19-2012, 05:40 PM   #4
newbiesforever
Senior Member
 
Registered: Apr 2006
Location: Iowa
Distribution: Debian distro family
Posts: 2,373

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by camorri View Post
The commands you think you do not have are privileged commands and need to be run as root. Use sudo, if your system is set up for sudo.

Oh, thanks...I forgot that privileged commands can claim "not found" if run as user. I think the system's response here is misleading. I mean, the commands are there, so why doesn't the system simply state that they require root privileges? One would reasonably assume the system will find a command if it exists; so if the system claims it can't find the command, one assumes it's not there at all.

Last edited by newbiesforever; 05-19-2012 at 05:45 PM.
 
Old 05-19-2012, 06:20 PM   #5
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,213

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
As a regular user the commands are not in your path, and that is where the system looks. So it reports "command not found". I like your logic, however, linux does not apply your logic.

Quote:
Usually, you don't have to run updatedb (it usually runs silently in the background, say, once every 24 hours)
That all depends on the system, and user configuration. The systems I have used, Mandriva, Ubuntu, and Slackware do not do an update, unless the sys admin adds a cron job to do so. There may be distros that come configured to do it though.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Network: Able to connect to encrypted, but unable to connect to open. WalterGL Linux - Newbie 1 09-16-2009 04:17 PM
Unable to connect to wifi network with network manager. Poss authorization issue openSauce Linux - Networking 14 12-13-2008 10:05 AM
can't find a wifi tool to connect to wpa-psk network lumix Linux - Networking 4 11-13-2008 01:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration