change color of prompt shell linux

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;21m\]\u\[\033[01;33m\]@\[\033[01;30m\]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

to make this permanent

echo 'PS1="${debian_chroot:+($debian_chroot)}\[\033[01;21m\]\u\[\033[01;33m\]@\[\033[01;30m\]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\\$ "' >> ~/.bashrc
Advertisements

connect to hidden wifi network

1 – Create the authentication file

wpa_passphrase wifiName passwdHere > /etc/wpa_supplicant/wifiName.conf

2 – Edit the authentication file as bellow:

vi /etc/wpa_supplicant/wifiName.conf

network={
        ssid="wifiName"
        #psk="passwdHere"
        psk=f867e1d63e4909d8c9e28bfcfe8569877996d0
        scan_ssid=1
        proto=WPA2
        key_mgmt=WPA-PSK
}

3 – Configure the machine to automatic connect to wifi network

vi /etc/network/interfaces

auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wifiName.conf

4 – Restart the network interface

/etc/init.d/networking restart

configurar rede linux com comando ip

Listar interfaces de rede

ip link show

Listar IPs IPV4 das interfaces de rede

ip -4 addr

Configurar IP a interface de rede

ip addr add 192.168.0.7/24 dev eth0

Habilitar interface de rede

ip link set eth0 up

Desabilitar interface de rede

ip link set eth0 down

Remover IP de interface de rede

ip addr del 192.168.0.7/24 dev eth0

Ver tabela de roteamento

ip route

Adicionar default gateway

ip route add default via 192.168.0.254

Adicionar rota de rede

ip route add 10.10.3.0/24 via 192.168.5.100 dev eth0

Remover rota de rede

ip route del 10.10.3.0/24