Linux Command: Tee

“The tee command is normally used to split the output of a program so that it can be both displayed and saved in a file.” wikipedia

tee file.txt

This command create a file.txt and anything you type is : displayed on the screen AND written to the file.

ctrl + z or ctrl + c 

Use this command above to end the session

tee -a file.txt

Same thing as the previous command, except this time it is using the -a (append) flag.

“Note: When tee is used with a pipe, the output of the previous command is written to a temporary file. When that command finishes, tee reads the temporary file, displays the output, and writes it to the file(s) given as command-line argument.” wikipedia

echo "We are YCSoftware" | tee -a file.txt 

The output of the echo command to be written to the file file.txt AND also displayed it on the screen


print_req_error: I/0 error, dev fd0, sector 0

Step 1

let’s list the block devices


if you are not using any floppy disk, there is no reason to have fd0 listed in the output of the command above.

Step 2

rsmod floppy

“rmmod is a simple program which removes (unloads) a module from the Linux kernel.” Now run step 1 again to verify that the fd0 is no longer listed.

Step 3

Run the following command to make the changes permanent

echo "blacklist floppy" | sudo tee /etc/modprobe.d/blacklist-floppy.conf

This command just create a file name blacklist-floppy.conf in the /etc/modprobe.d folder and appends the text “blacklist floppy” to it.

Step 4

The last step is to reconfigure the kernel

dpkg-reconfigure initramfs-tools

Letsencrypt certbot auto renew not working (Debian, Ubuntu) systemd

If your letsencrypt SSL certificates are not renewed automatically, chances are that your certbot.timer service is not running.

Here are the steps to troubleshoot this issue:

1. List all current systemd timers
(see if Certbot is listed, chances are it is not listed)

systemctl list-timers --all

2. Verify that these files exist:


Note that there is no need to create a separate cron jon to trigger the renawal if these files exist.

3.Start the Certbot Timer
If the files above exist then run the following command to start the timer service

systemctl start certbot.timer

4.Enable the Timer on BOOT
Now enable the timer service on boot

systemctl enable certbot.timer

List all the timers again to verify that certbot is running

systemctl list-timers --all