Connecting Slackware to WPA2/PSK wireless network

A friend asked me to help him connecting his Slackware PC to wireless connection,
So i gave him this tutorial i wrote 3+ years ago in Arabic when i faced the same problem that took  good two days of reading documentations.

Anyway I think it would be useful to translate it in English so it could help more people

– The obvious and easiest way to get your Slacware PC connected to a wireless network is using WICD, Unfortunately for some reasons this wasn’t possible for me.

So here is how to make a native wireless connection

– I’ll assume you have a running WPA2/PSK encrypted wireless network you want to log in

1- Know your hardware

lspci | grep 'Network controller'
03:00.0 Network controller: Intel Corporation Wireless WiFi Link 5100

Fortunately its supported by the kernel, i need no patches or drivers

2- Know your cards name

ifconfig -a

You will get something like this


eth0      Link encap:Ethernet  HWaddr 00:1e:33:81:5a:fc


UP BROADCAST MULTICAST  MTU:1500  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
Interrupt:28 Base address:0x4000

lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING  MTU:16436  Metric:1
RX packets:48 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2560 (2.5 KiB)  TX bytes:2560 (2.5 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:21:6b:3e:27:5c
inet addr:192.168.1.166  Bcast:192.168.1.255  Mask:255.255.255.0
inet6 addr: fe80::221:6bff:fe3e:275c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:6245 errors:0 dropped:0 overruns:0 frame:0
TX packets:5587 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4484716 (4.2 MiB)  TX bytes:1016291 (992.4 KiB)

So it’s wlan0… lets wake it up!

ifconfig wlan0 up

2- You can use this if you’re not sure what’s your network name “ESSID”

iwlist wlan0 scan

If you didn’t get any output – make sure your network is setup properly or the more disturbing, search for your hardware driver… God help you.

3- Assuming everything went fine,

su - c wpa_passphrase YourESSID Password #Replace them with your ESSID and password

You will get something like:

root@ahmed:~# wpa_passphrase YOURESSID password
network={
ssid="YOURESSID"
#psk="password"
psk=9662ef151ea49312e467ff7b9220f4a7204d618aca903d5a86383dd9e1ca0dea
}

4- copy those lines, and open this file with your favorite text editor

/etc/wpa_supplicant.conf

There you’ll find something like this

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1

network={
scan_ssid=0
ssid="your_essid"
proto=WPA RSN
key_mgmt=WPA-PSK WPA-EAP
pairwise=CCMP TKIP
group=CCMP TKIP
psk=your_64_hex_characters_long_key
}

change ssid value with your networks’ name, psk with psk value from the output you copied, And proto with WPA2

5- Change file privileges

chmod 600 /etc/wpa_supplicant.conf

6- Open this file with your favorite text editor


/etc/rc.d/rc.inet1.conf

And add those lines

# Config information for wlan0 (using dhcp):
IFNAME[1]="wlan0"
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]="yes"
DHCP_HOSTNAME[1]="My_ESSID" #Change it with your networks' name
WLAN_WPA[1]="wpa_supplicant"
WLAN_WPADRIVER[1]="wext"

And add your networks’ values if you are not using DHCP.

– save the file, We are almost there 😀

/etc/rc.d/rc.inet1 wlan0_restart

congratulations your PC should be connected now 🙂

Resources :

/usr/doc/wpa_supplicant-0.6.10/README.slackware

Configuring your network in Slackware

Slackware Linux Essentials – Network Configuration

 

How to install Intellij IDEA on Linux

This guide should work on any Linux distribution, And i will assume you have java installed on your machine

1- Obtain your copy from Intellij IDEA and move it to your home directory

2- Extract the tar file and move it to /opt change the with the right file name


sudo -i #we'll need root shell  during installation

tar -xvzf ideaIC-11.1.3.tar.gz /opt

3- Add read permissions to all files

chmod -R +r /opt/idea-IC-117.798

4- Create an executable file


touch /usr/bin/IDEA

chmod 755 /usr/bin/IDEA

#Use vim or your favorite text editor

vim /usr/bin/IDEA

## Paste the following lines

#!/bin/sh
export IDEA_HOME="/opt/idea-IC-117.798/bin"

$IDEA_HOME/idea.sh $*

5- Create Gnome/KDE menu icon


## Create this file with your favorite text editor or continue with

/usr/share/applications/IDEA.desktop

#Paste the following lines to the file

[Desktop Entry]
Encoding=UTF-8
Name=intellj IDEA
Comment=Intellij IDEA IDE
Exec=IDEA
Icon=/opt/idea-IC-117.798/bin/idea.png
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true

6- Enjoy your IDE and happy coding 🙂

 

Note: In future releases the steps remains the same, just change the folder name  “idea-IC-117.798”