The Linux Page

Low Level Formatting an HDD or SSD

Dog that shread a bed to pieces by gomagoti.
By Gomagoti

(License CC: Some rights reserved)  

WARNING

Do not apply the Secure Erase on a USB Drive or a drive connected through an SAS or RAID system as it may render your drive unusable. (See Brick (electronics) for an idea of what you could end up with in this case.)

Secure Erase

Modern hard drive controllers and drivers on Linux can make use of the special feature called SECURE ERASE.

To see whether ...

Terminal prints ^C when hitting Ctrl-C on command line or running process

Many old parchements have much of their text hidden or lost...

As anyone else, I use Ctrl-C all the time.

I start writing something in my terminal and it's not what I needed, I hit Ctrl-C to Cancel that line.

This is the same as the Ctrl-C to Cancel a program. In that case it sends a SIGINT to the running process (this assumes that you are running a process that did not detach itself from your console.)

Although on the command line I often do that because I want to keep what I just typed right there on the screen because I will use it, just not right now. And when a ^C is printed in there, that's just really not practical!?

It looks like ...

HP Printer options not offering "Color: Off" option anymore

Here is a picture of my old LaserJet 2550L which I use as a black & white printer.

My old LaserJet 2550L printer which I use with Linux Ubuntu.

Upgrade

HP Color LaserJet Pro Multifunction M479fdn Laser PrinterI now upgraded my printer. The old one just gave up completely and only printed white pages.

My new printer is a multifunction from HP the HP Color LaserJet Pro Multifunction M479fdn Laser Printer. I don't print that much so that's a good model for my needs.

The one main issue I run into once in a while, a document just doesn't get through. The printer sits there with a message saying it's working on it, but nothing happens. Since it normally prints within seconds, that's not a normal state. The ...

Installing an Ubuntu Server & more

A beautiful table ready to be server with plates, glasses, napkins, all very elegantly set.

Getting the OS

First go to https://ubuntu.com/ and get the latest version you're interesting in. They offer server version that they support for 5 years or so. I suggest one of those if you want to run a server. This is an ISO, in generate around 600Mb so be ready to wait a few hours... Even with a really fast connection, because the transfer will be limited by the mirror in most cases.

WARNING
Unless you know better, I strongly suggest you get the Ubuntu Server version. Maybe a bit more annoying to use BUT it works on ALL computers. And ...

Sorting files by last modification date when found with "find"

Sorted desktop items in various jars made of glass.

We often want to sort filenames by date. It's easy enough with the ls command we use the -t command line option.

ls -t

Then we can use the -r to reverse the list which means we see the last modified file at the end of the list.

ls -tr

Futher I tend to use the -l to see more details when listing and verify that my command does what I expect it to do.

Now there are situations where a more complex search than a simple shell glob is necessary. For example, looking for a file that includes the name '*linux*' in a whole tree of files would go like this:

find path-to-search ...

Ubuntu 18.04 Desktop, Keyboard and Mouse settings

Ubuntu 18.04 Beaver

Super-be Interface: Gnome 3

This page is for me to remember what the heck I had to do to get my desktop back to normal. One main thing that changed quite a bit: the Super key is often used instead instead of the Alt key. For example, to switch between workspaces (I have 12 so I need that functionality really bad!) and also to move windows about without having to find their title bar which often are hidden by other windows anyway.

Note: I know that Gnome 3 has been out for a while, I just did not want to get a new Desktop version which may not be 100% compatible on my old server so I am ...

Setting up Postfix/Courier with a GoDaddy SSL certificate

Lock you emails down by encrypting them properly with an SSL certificate.

Getting a Signed Certificate

In order to have TLS support for Postfix you need to setup several files.

First of all, you create a certificate and get it signed by GoDaddy. They have instructions for that purpose. At this time, it looks something like this:

openssl req -new -newkey rsa:2048 -nodes \
            -keyout domain.key -out domain.csr

The names "domain.key/csr" should match your domain name. If you are signing a specific sub-domain, you may want to include that sub-domain in the filename (i.e. mail.domain.key.)

When GoDaddy returns to you, they will give you a ...

ntpd: inappropriate address 127.0.0.1 for the fudge command, line ignored

Synchronizing your old close with the worlds best time keepers... and your computer's fallback clock.

I think I noticed that error before but did not pay close attention to it since my NTP just worked.

The fact is that something changed a while back (the new PPS API was accepted in 2000) and the fudge command was not updated accordingly. Either that, or the setup was always wrong?

The old /etc/conf/ntpd setup file included a line like this:

fudge   127.0.0.1     stratum 10

which is wrong because the local clock is not consider to be part of 127.0.0.1. I've never changed that IP address because I rarely look at the ntpd logs and since I did today, I noticed that error.

The correct ...

Changing your Linux computer hostname on Ubuntu 18.04+

Changing the name of your computer (especially if it's Hal, that's dangerous!)

Ubuntu 16.04 and older

Changing your computer hostname used to be really easy:

sudo vim /etc/hostname

Change the name there and reboot.

If you reference the hostname in /etc/hosts, you also want to update that there and any other settings (such as tripwire).

The fact is that worked great in older versions. Change the name in that file, reboot and voilà the new name was the current name. The reboot is important because otherwise some of your services may not catch the modification. Yes. You can do:

hostname <new-name>

and it works as expected (i.e. try to log out ...

Watching the frequency of my CPUs in real time under Linux

CPU frequencies as I run one large compression.

I noticed that the Linux Kernel allows for CPU frequencies to vary. But I could not really see any CPU running at a speed other than 800MHz when looking at /proc/cpuinfo so I thought that they were "stuck" there.

Looking a little further, I found a question with a good answer on Unix & Linux. You can use /proc/cpuinfo alright, but you've got to look at it constantly otherwise it will not look like it changes. That is, the change is so temporary, it happens so fast, that you really have to track that quickly otherwise you'll miss it.

Here is a command we can readily ...