Kategori arşivi: Linux

Raspberry Pi / Linux : Change mac address permanently

To change mac address of raspberry pi, edit /etc/network/interfaces file as shown below;

auto eth0
iface eth0 inet dhcp
hwaddress ether 00:00:00:00:00:00 # (mac address)

And then reboot the pi. It’s ok.

Raspberry Pi 3 Model B Eduroam Settings

Add following commands to /etc/wpa_supplicant/wpa_supplicant.conf and reboot raspberry pi.

network={
 ssid="eduroam"
 key_mgmt=WPA-EAP
 auth_alg=OPEN
 eap=TTLS
 identity="mail_address@nevsehir.edu.tr"
 password="your_password"
 phase1="tls_disable_tlsv1_1=1 tls_disable_tlsv1_2=1"
 phase2="auth=PAP"
}

Ubuntu 16.04 Postgresql Installation and Restore SQL Dump

sudo apt-get install postgresql
sudo -u postgres -i
psql CREATE DATABASE dbname;
psql dbname < directory/data_backup.sql

\l --> list all database
\c dbname;  --> select database to use
\d+ --> list properties of the database
\d tablename describe table;

SELECT * FROM tablename WHERE column1 = 'asd' AND column2 = 'bcd';

:q --> quit from query