Display running IP(s) on the Console Login Screen

  PREFIX="Local IP addresses:"
  IPADDRS=$(hostname -I | tr " " "\n" | grep -v "^$" | sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tr "\n" " ")

  perl -i -p -0777 -e "s/^$PREFIX[^\n]*\n\n//m; s/$/\n$PREFIX $IPADDRS\n/ if length('$IPADDRS')>6" /etc/issue
  sudo service getty@tty1 restart

# Set up the job to run on reboot
sudo crontab -e
@reboot sleep 10; sudo /home/rlemmerm/launcher2.sh

Switching boot target to text

The procedure is as follows to change into a text mode runlevel under systemd:

Open the terminal application.
For remote Linux servers, use the ssh command.
Find which target unit is used by default:
systemctl get-default
To change boot target to the text mode:
sudo systemctl set-default multi-user.target
Reboot the system using the reboot command:
sudo systemctl reboot

sudo systemctl set-default graphical.target
Reboot the system using the reboot command:
sudo systemctl reboot

List RAM and CPU info

egrep 'MemTotal|MemFree|MemAvailable' /proc/meminfo lscpu | egrep 'Model name|Socket|Thread|NUMA|CPU\(s\)'

Load testing Apache2


apt-get install apache2-utils

ab -n 100 -c 100 -H "Accept-Encoding: gzip, deflate" -rk https://insider.crouse.org/ |tee > bench.txt

Turn off power saving

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target

DD a disk  duplicate a disk

dd if=/dev/sda of=/dev/sdb bs=4096 conv=noerror,sync status=progress

IsMounted + crontab + DoBackups.sh

(plex )~ cat ./IsMounted.sh


a=$(df -h|grep -c "$1")
echo $a

if [ $a -eq 1 ]

(plex )~ crontab -l
0 22 * * * /home/user/DoBackups.sh

(plex )~ cat DoBackups.sh
#  Make sure the drives are mounted before running scripts

/home/user/IsMounted.sh  bigdrive /home/user/backup_Drives.sh
/home/user/IsMounted.sh  windowsshare /home/user/backup_mysql.sh
/home/user/IsMounted.sh  windowsshare /home/user/backup_PlexMetaData.sh