Category: Linux
-
PXE Server on Existing Network
Many thanks to Sebastian Krysmanski’s original post! The Goal At the end of this article you’ll have a working PXE server that lets you boot memtest86+ over a network. The goal is to have a simple but working solution. This is why I’m using memtest. It consists of just one file and thus is easy to…
-
Change linux hostname
How to change the hostname of the system sudo hostname (new hostname) Change old hostname also in the following file: sudo nano /etc/hosts
-
OpenVPN shortcut
This script will show your current WAN IP address before and after connecting to your VPN. VALID_IP=”123.123.123.123″ #this is the correct IP you should be connected to myip=”$(dig +short myip.opendns.com @resolver1.opendns.com)” echo “My current WAN/Public IP address: ${myip}” echo “Starting OpenVPN connection” sleep 1 sudo openvpn –config ~/path/to/VPNConfig.ovpn –daemon echo “Establishing connection…” sleep 8 myip=”$(dig…
-
Add user to sudo- ers file
Open the sudoers file: sudo visudo will open the /etc/sudoers file in the editor defined in $EDITOR (probably GNU nano – set the variable if it’s not what you want, eg export EDITOR=”nano” and try sudo visudo again). Add the below line to the end of the file. username ALL=(ALL) ALL # Change the user…
-
OpenVPN running in background
Simply run the following command in terminal: sudo openvpn –config ~/Documents/path-to/VPNConfig.ovpn –daemon It is not nescessary to leave the terminal open! To kill the connection, stop the process. Identify the correct process ID number. ps aux | grep openvpn Kill the process. sudo kill [id-number]
-
Daily backup to external hdd
Goal Domoticz has a built in feature to automatically create hourly, daily and monthly database backups in the /home/pi/domoticz/backups/ directory. You just need to tick the Enable Automatic Backup option in System setup. However in the case the SD-card crashes and is no longer accessible, a lot of work still could be lost. This page…
-
OpenSSH server install Ubuntu
1. To install it, open terminal (Ctrl+Alt+T) or log in Ubuntu server and run command: sudo apt-get install openssh-server 2. After that, you should have SSH service enabled in your system, you may check its status by running command: sudo service ssh status 3. You may change some settings (e.g., the listening port, and root…
-
Mount Windows Shares Permanently
CIFS installation sudo apt-get install cifs-utils Mounting unprotected (guest) network folders First, let’s create the mount directory. You will need a separate directory for each mount. sudo mkdir /media/windowsshare Then edit your /etc/fstab file (with root privileges) to add this line:
-
Pi-Hole DNS AdBlocker
Install Run the following script: curl -sSL https://install.pi-hole.net | bash Update Just run the following script: pihole -up