LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   can't find software to connect to network from CL (https://www.linuxquestions.org/questions/linux-general-1/cant-find-software-to-connect-to-network-from-cl-945912/)

newbiesforever 05-19-2012 01:36 PM

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.

camorri 05-19-2012 03:07 PM

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.

salasi 05-19-2012 04:34 PM

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.

newbiesforever 05-19-2012 05:40 PM

Quote:

Originally Posted by camorri (Post 4682819)
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.

camorri 05-19-2012 06:20 PM

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.


All times are GMT -5. The time now is 09:00 PM.