Fix eth0 on fresh install of Debian 9

April 24, 2018 Comments off

You can disable these stable names and go back to the kernel-provided ones
(which don’t have a stable order) in one of two ways:

– Put “net.ifnames=0” into the kernel command line (e. g. in
/etc/default/grub’s GRUB_CMDLINE_LINUX_DEFAULT, then run “update-grub”).

– Disable the default *.link rules with
“ln -s /dev/null /etc/systemd/network/”
and rebuild the initrd with “update-initramfs -u”.
The above is from a debian readme file.

Categories: sysadmin

Use CSS to keep footer on the bottom of a container when you vary the size

April 2, 2018 Comments off

You can keep the footer on the bottom of a CSS container like this example. The
Height statement in the the #topofpage ID (1280px) controls the whole page container.
The #pages statement is the lower page half below the horizontal navigation bar.
If you vary the page size with the #topofpage height the #pages and #footer sections
will keep the footer on the bottom.

#topofpage {
width:870px;max-width:100%;height:1280px;max-height:100%;margin-right:auto;margin-left:auto;margin-bottom:auto;border-bottom:1px solid black;box-shadow: 400px 0px 0px 0px rgb(100,125,100), -400px 0px 0px 0px rgb(100,125,100);border:1px solid black;

#pages {
font-family: “Helvetica”, “Arial”, sans-serif;
height:calc(100% – 340px);
# height:940px;
margin-top: 0px;
margin-bottom: 0px;
# border-radius: 20px;
#footer {
font-size: 15px;
font-family:”Times New Roman”;
# border-radius: 20px;

Categories: sysadmin

Use SMS for a reminder for meds, birthdays, etc. *

March 17, 2018 Comments off

You can use SMS to remind yourself with a text message if you have access to one the cellphone
gateways for SMS and run your own mail server (you can use a client too but this example
is for a linux server).

Here are the major US SMS gateways. Most all the MNVO providers are listed on line too.

Sprint [insert 10-digit number]
T-Mobile [insert 10-digit number]
U.S. Cellular [insert 10-digit number]
Verizon [insert 10-digit number]

Just use the sendmail command and set up a crontab entry (Debian example):

30 22 * * * echo “take your meds” | /usr/sbin/sendmail 12345678910@cellgateway
will send you “take your meds” at 10:30pm every day.
* Works for android. Iphone’s work however text may not be formatted correctly.

Other reminders can be added.

I find this more useful than email or cell phone alarms.

Categories: sysadmin

Easily add to pdf file

October 30, 2017 Comments off

You can easily add to a pdf file with pdftk (Debian apt install pdftk).

Simple syntax:

pdftk file1 file2 cat output file3.pdf

It does much more than that. Read the man pages for more info.

Categories: sysadmin

vim on Debian 9 issue with cut and paste

July 25, 2017 Comments off

While using vi (vim) on Debian 9 via cli, there is an issue with cut and paste with a mouse.
This can be corrected by adding a .vimrc file to your user folder as shown below
##CONTENTS OF .vimrc
set mouse=””

This will re-enable the mouse cut and paste feature from a terminal.

Categories: sysadmin

Upgrade Debian Jessie to Strech

June 24, 2017 Comments off

The upgrade process is easy via the cli.
Just complete the following and answer any questions.
I let the system restart daemons automatically and kept original conf files.
This has worked on three Debian 8 systems without a hitch.

apt-get update
apt-get upgrade
apt-get dist-upgrade
cp /etc/apt/sources.list /etc/apt/sources.list_backup
sed -i ‘s/jessie/stretch/g’ /etc/apt/sources.list
apt-get update
apt list –upgradable
apt-get upgrade
apt-get dist-upgrade

After completing you can reboot and autoremove old packages.

Categories: sysadmin

copy your debian installed packages to a new machine

June 17, 2017 Comments off

Run this to retrieve a list of installed packages:

dpkg -l | grep ^ii | awk ‘{print $2}’ > installed_packages

Then install on new system with:

apt-get install $(cat installed_packages)

You should probably look at installed_packages and remove any obvious

Categories: sysadmin