You are not logged in.

#1 2014-11-15 05:57:30

snakepie
Member
Registered: 2014-11-15
Posts: 2

order to connect to internet

Hello,

I can connect to the internet from the base version of archlinux using the following commands and I want to understand why it works and what happens in laymans terms. I skimmed through some of the man pages for the commands but I'm overwhelmed and I guess I want to know why these commands work.


  • ip link set wlp3s0 up
  • iw dev wlp3s0 connect NameOfNetwork key 0:NetworkPassword
  • dhcpcd wlp3s0

Also I tried to use the

dhcpcd wlp3s0

command after

ip link set wlp3s0 up

and it broke and I would like to know why. From what I gather the first command loads in the wireless card firmware, the second one establishes a connection to a source, and I don't really know what the third one does. At first I tried to use wifi-menu but I think its wiki page said the password needed a flag otherwise it would be interpreted as hexadecimal but I didn't try it with the flag and just used the above.

How would I safely put these commands in a script so I don't constantly broadcast the password in plaintext? Also is that assumption correct? Am I really just sending out my password when I use the 2nd command? I really don't know much about scripting. Thank you for any help, it is greatly appreciated.

Offline

#2 2014-11-15 06:02:13

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: order to connect to internet

man dhcpcd wrote:

DESCRIPTION
     dhcpcd is an implementation of the DHCP client specified in RFC 2131.  dhcpcd gets the host information (IP address, routes, etc) from a DHCP server
     and configures the network interface of the machine on which it is running.  dhcpcd then runs the configuration script which writes DNS information to
     resolvconf(8), if available, otherwise directly to /etc/resolv.conf...

You can use wpa_supplicant (or one of the other tools) to manage your passphrase, rather than attempting to script it yourself.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB