locale-gen en_US en_US.UTF-8 tr_TR.UTF-8
dpkg-reconfigure locales
Kategori arşivi: Linux
linux change localtime
sudo rm /etc/localtime
sudo ln -s /usr/share/zoneinfo/Turkey /etc/localtime
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.
Linux: grep only words that like search pattern
Below commandline searches “PS…” pattern in a document.
grep -oh "\w*PS\w*" * somedoc.txt
Resource: http://stackoverflow.com/questions/1546711/can-grep-show-only-words-that-match-search-pattern
Linux Seri Porttan Veri Okuma
Öncelikle seri porta takılan cihazın yolu tespit edilir;
ls /dev/serial/by-path/
/dev/serial/by-path/pci-0000:00:1d.7-usb-0:4.4:1.0
Daha sonra veri okumaya başlıyoruz;
sudo cat /dev/serial/by-path/pci-0000:00:1d.7-usb-0:4.4:1.0
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: Unable to automatically remove LVM data error during installation
Press Alt + F2 and open console, then run this command
vgremove -f volumegroupname
You can learn volume group name from installation GUI.
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