Setup oh-my-zsh


$ sudo apt-get install zsh
$ cd
$ sh -c "$(curl -fsSL"


$ sudo sh ~/.oh-my-zsh/tools/; chsh -s /bin/bash


Mount usb linux command line

# ways to find flash drive
dmesg | tail
sudo fdisk -l
ls /dev/sd*
df -h

# make a directory to mount the usb
sudo mkdir /media/usb

# mount usb
# to grant permission to all when mounting add umask flag. For only root omit flag.
sudo mount -o umask=000 /dev/sda1 /media/usb

# if error mount: unknown filesystem type 'exfat'
sudo apt-get install exfat-fuse exfat-utils

# mount on every boot
# determine the partition/filesystem type for proc column
sudo blkid /dev/sda*

# edit file
sudo nano /etc/fstab

proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1
/dev/sda1       /media/usb      exfat   defaults
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that

# unmount
sudo umount /dev/sda1

# resources
How to Mount USB Drive on the Raspberry Pi

# tags
ntfs fat32 ext4

Sync server time and date

sudo service ntp stop
sudo ntpd -gq
sudo service ntp start


Connect to wifi in the command line

The wifi access point security will determine the way you connect to it.

If WEP (less secure)


Configuring WPA
# view enabled connections
$ ifconfig

# view enabled and disabled connections
$ ifconfig -a

# To find out the name of your wireless card device. Look at the row that has some information in it, not ‘no wireless extensions’. In this example its wlan0.
$ iwconfig

# find wireless/wifi access points
$ sudo iwlist scan
$ nmcli dev wifi list # source
# an alternative can be “wavemon” if installed on your machine

# Add wifi network ssid and password
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
# add to the bottom of file


# wpa_supplicant.conf is being included in /etc/network/interfaces. Another option would be to edit interfaces file directly. Example Below.

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
auto wlan0

iface wlan0 inet dhcp
	wpa-ssid "your_wireless_ssid"
	wpa-psk "your_wireless_password"

# restart connection. This is an alternative to restarting the computer
$ sudo ifdown wlan0
$ sudo ifup wlan0

# you should now see an ip address under “inet addr:”
$ ifconfig wlan0

# test internet connection
sudo ping

# useful commands
# 10 Useful “IP” Commands to Configure Network Interfaces

$ ip addr show
$ ip route show

wireless interface, network, raspberry pi

Create a router/Access Point for wifi

followed these instructions

Ran these commands
1 sudo apt-get update
2 sudo apt-get install hostapd isc-dhcp-server
3 sudo nano /etc/dhcp/dhcpd.conf
4 sudo cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.orig
5 sudo nano /etc/dhcp/dhcpd.conf
6 sudo nano /etc/default/isc-dhcp-server
7 sudo ifdown wlan0
8 sudo cp /etc/network/interfaces /etc/network/interfaces.orig
9 sudo nano /etc/network/interfaces
10 ifconfig
11 sudo ifconfig wlan0
12 ifconfig
13 sudo nano /etc/hostapd/hostapd.conf
14 sudo cp /etc/default/hostapd /etc/default/hostapd.orig
15 sudo nano /etc/default/hostapd
16 sudo cp /etc/sysctl.conf /etc/sysctl.conf.orig
17 sudo nano /etc/sysctl.conf
18 sudo sh -c “echo 1 > /proc/sys/net/ipv4/ip_forward”
19 sudo nano /etc/sysctl.conf
20 sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
21 sudo iptables -A FORWARD -i eth0 -o wlan0 -m state –state RELATED,ESTABLISHED -j ACCEPT
22 sudo iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
23 sudo iptables -t nat -S
24 sudo iptables -S
25 sudo iptables -L
28 sudo sh -c “iptables-save > /etc/iptables.ipv4.nat”
29 sudo nano /etc/network/interfaces
30 wget
31 unzip
32 sudo mv /usr/sbin/hostapd /usr/sbin/hostapd.ORIG
33 sudo mv hostapd /usr/sbin
34 sudo chmod 755 /usr/sbin/hostapd
35 sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf
40 sudo raspi-config
41 sudo reboot
43 sudo service hostapd status
44 sudo service hostapd start
45 sudo service isc-dhcp-server start
46 sudo /usr/sbin/hostapd /etc/hostapd/hostapd.conf
47 sudo service hostapd status
48 sudo update-rc.d hostapd enable
49 sudo update-rc.d isc-dhcp-server enable
50 sudo mv /usr/share/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service ~/

created an image backup called

additional help

Turn Your Raspberry Pi Into a WiFi Hotspot with Edimax Nano USB EW-7811Un (RTL8188CUS chipset)

Browse Anonymously with a DIY Raspberry Pi VPN/TOR Router

FTP Server Setup

In ubuntu 14.04

How to setup FTP server on ubuntu 14.04 ( VSFTPD )

In ubuntu 12.04

mkdir /home/user/ftpfiles
sudo su
apt-get install vsftpd
cp /etc/vsftpd.conf.bak
nano /etc/vsftpd.conf
groupadd ftpusers
useradd -g ftpusers -d /home/user/ftpfiles newusername
passwd newusername
chmod 775 /home/user/ftpfiles
chown root:ftpusers /home/user/ftpfiles
chmod a-w /home/user/ftpfiles
service vsftpd restart
ftp localhost

500 OOPS: could not read chroot() list file:/etc/vsftpd.chroot_list
– /etc/vsftpd.chroot_list file doesnt exist created it
– touch /etc/vsftpd.chroot_list

500 OOPS: vsftpd: refusing to run with writable root inside chroot ()
– chmod a-w /home/user/ftpfiles

– resource:


# determine if ftp port is listening
$ sudo nmap -sS

# telnet test
# attempt a successful login and determine current working directory
# list of commands
$ telnet localhost 21
user ftpuser
pass password

Virtual Box Internet Issue

The problem:
unable to connect to internet
$ ping google (doesnt work)

What might cause the problem:
Added the ‘Host-only Adapter’ network to the virtual box

remove static ip from /etc/network/interfaces (changed it back to dynamic)

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

#auto eth0
#iface eth0 inet static
#       address
#       netmask
#        network
#        broadcast
#        gateway

remove the 2nd network and only stayed with the 1st one (Bridged Adapter)

reflesh the MAC address (not sure if this help)


edit /etc/network/interfaces changed back to static ip address

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp

auto eth0
iface eth0 inet static

edit using the GUI

operating system:
Linux cowboy 3.12-kali1-686-pae #1 SMP Debian 3.12.6-2kali1 (2014-01-06) i686 GNU/Linux

Kali Linux Virtual Box

from video with minor changes relative to my computer

view-1 / main menu
Click new

name: kali linux
type: linux
version: debian

1025mb in ram (check the minimum on site)

create a virtual hard drive now

VDI (virtualBox Disk Image)

Dynamically allocated

20.23 GB (check website for minimum)

the partition is created
in main menu
click “green arrow” / “start”

browse for kali-linux-1.0.6-i386.iso
click start

kali linux start screen will appear and now you start installing

at the end
you will get an error to fix
so go to settings -> system -> processor and check “enable PAE/NX”