Linux

Wget The Non-Interactive Network Downloader Tips and Tricks

Submitted by Greg Nowak on 2021-04-10

Many times you need to download files from the internet, specifically when you want to automate a process or two. Here is where wget comes in handy. This is a standard tool on most Linux systems.

In some cases the server you want to download from does a couple of checks, so your automation fails. You can come by that by adding a couple of switches like:

wget --user-agent="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" --auth-no-challenge URL_OF_FILE_TO_DOWNLOAD

Sometimes: wget --user-agent="Mozilla"

Tags

Adjust power management settings for Ryzen Processors

Submitted by Greg Nowak on 2021-02-23

This might be useful when your machine shuts down unexpectadly under heavy loads: https://github.com/FlyGoat/RyzenAdj

For me it only happens in Windows when the batery is charging too. I think charging thresholds are a must. In linux we have tlp: https://linrunner.de/tlp/ and https://wiki.archlinux.org/index.php/TLP and https://github.com/linrunner/TLP :-D

Enable SMART on Old External Seagate SSD Ubuntu 20.10

Submitted by Greg Nowak on 2021-02-05

I have an old external seagate ssd 2TB for backup called "BUP Slim BL". It was a challenge to enable the SMART capability on Ubuntu 20.10.

You might give this a go: sudo smartctl -d sat -T permissive --smart=on /dev/sda1

If that does not work, you might need:

echo options usb-storage quirks=$(lsusb | awk '/Seagate/ {print $6}'):u | sudo tee -a /etc/modprobe.d/ignore_uas.conf
sudo update-initramfs -u

Sending Mails From A Linux Server

Submitted by Greg Nowak on 2020-12-03

In this example we use Ubuntu linux.

First test if you can access gmail through port 25: telnet gmail-smtp-in.l.google.com 25

Test mail with: echo "Hello world" | mail -s "Test Email" -a "From: [email protected]" toMail.com

 

Mail configuration

/etc/mailname > grn.dk

/etc/hostname > grn.dk

/etc/hosts > [IP] grn.dk localhost

/etc/postfix/main.cf >
myhostname = grn.dk
mydestination = grn.dk, localhost
relayhost = [EMPTY]
 

Tags

Grub settings and options

Submitted by Greg Nowak on 2020-10-27

Default kernel parameters: "quiet splash".

In my opinion you will get more sucessful boots and reduced graphical errors on boot if you remove quit and splash. Specifically the splash screen can make strange things happen and when removing "quiet" you are able to debug if there is an error.

 

I also tried to fiddel with "/etc/grub.d/48_linux_zfs" where I tried to out comment #vt_handoff="1" and set quiet boot to zero: 

 

Tags