Configuring a wlan under wpa key
Forget iwconfig command, that only used on wep-key authentication.
For configuring a wpa you have to edit
/etc/wpa_supplicant/wpa_supplicant.conf
We will get something like that. if there’s any line left cut it out. Everything what don’t look like the context below is therefore unecessary.
ap_scan=1
fast_reauth=1
network= {
ssid = “my essid”
psk = “my wpa key”
}
For getting up the interface we have to type:
iw_suplicant -c /etc/wpa_suplicant/wpa_suplicant.conf -i wlan0
This method works independent from NetworkManager service. Although you get it with NetworkManager service, sometimes you’d rather to configure a simple and functional process. I’m used to work over fluxbox at minimal configuration.
Greetings from Carlos, I hope that it can be useful.
Have a fun, enjoying by awk, part 1
Let’s learn a bit of awk command once for all. SO HERE WE GO!!!!
Here I wanna describe some certain command sentences where there’s people that find it useful. I’m right one of them.
So, let’s say if you someday need to put in action a simple command line which can be able to get part of a command out and implement it whatever you want.
For exemple.
Have a look right down on this content
ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:09:6B:7F:FA:29
inet addr:10.0.46.66 Bcast:10.0.46.95 Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:414766283 errors:0 dropped:0 overruns:0 frame:0
TX packets:329442281 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Now you predict to catch all of your servers and workstations IPs and Masks up, once they’ve been put in a file list.
ifconfig eth0 | grep inet |awk {‘print $2’} >> /tmp/foobars.txt
addr:10.0.46.66
ifconfig eth0 | grep inet |awk {‘print $4’} >> /tmp/foobars.txt
Mask:255.255.255.224
Don’t be afraid, I’ll make a quick explanation about the command above.
Well, ifconfig command comes out all that description lines previously. After that, everything what came out from the ifconfig command will be redirected to other command in order. The second one (grep) will get the ifconfig output and it must return a line like this:
“inet addr:10.0.46.66 Bcast:10.0.46.95 Mask:255.255.255.224”.
We can notice some gaps after each information, awk (our next command) will get that information and split by gap.
Actually, each gap consists an information stored by a variable starting for $1.
So if you just wanna get the IP’s number and Netmask’s number information based on the list returned (inet addr:10.0.46.66 Bcast:10.0.46.95 Mask:255.255.255.224). where we’ve found:
inet ($1)
addr:10.0.46.66($2),
Bcast:10.0.46.95 ($3),
Mask:255.255.255.224 ($4).
So, here you are.
Now it’s just redirect its output to a file with “>> / tmp/foobars.txt”
Until next time!!!
A great and usually useful command to capture the graphical screen (X) through a shell.
If you sometimes have to be connected on a Linux Station through ssh connection and you by chance want to see what the user currently is doing. I’m convinced at all that kind of problem what is using up too much of your time (wasting time as it is called here). It’s due to an effort of a big friend of mine. DiDi Pena :)
Just type:
import -display :0 -window root printscreenfromblablabla.jpg
I think that’s all for today!
Have you all a good weekend.
Cheers!
How to erase files when “file list” is too large to be erased by rm command
Through find command.
find /directory –name “blablabla*” –exec rm {} \ ;
through xargs command.
ls | xargs –n10 –I rm {}
Well, I hope it could be useful!
Cheers!