Welcome to nixCraft Linux/Unix newsletter for Wednesday, 04 May 2022. I hope you will enjoy this version of the newsletter.
Let us start this newsletter with some bash terminal tips.
You can use the Ctrl
keys to increase
productivity when using bash on your macOS, Linux and Unix machines. For
example, instead of typing the clear command to clear the screen, you
can press the Ctrl+L
to clear the screen. These are part
of the GNU readline library and default on most Linux distros as Emacs
keybindings for the bash. I have attached a small cheat sheet with this
newsletter for your consumption. Do try it out:
![](https://ci3.googleusercontent.com/proxy/qV5RC1b0I6N6274i72wiQ4aTJC-JNxGp-HAuSbn1YG0fjmEnaNIbVgk2NqJsJlthqx8_Hayclb9ZXXNYhbCGKFWbBk4jhhKYxPs=s0-d-e1-ft#https://newsletter.cyberciti.biz/uploads/1651657510.png)
Did you know you can collect and summarize all hardware details of your machine using any one of the following commands:
sudo lshw -html > config.html # dump to the html file
xdg-open config.html # view it
Also do try out inxi command to dump hardware info on your FreeBSD or Linux machine:
inxi -Fx
![](https://ci6.googleusercontent.com/proxy/_B7pq7Wl97F9GVZfBgwuMtR75vpEaLsWmNOJzJPlz5xHtXwqNBVBj2AuSsiGKhmlx3coNnxniT3At7r2GySgqNc4wtgpcLoTiI0=s0-d-e1-ft#https://newsletter.cyberciti.biz/uploads/1651658412.png)
I have a detailed tutorial about finding your BIOS version under Linux, including upgrading BIOS firmware using Linux. No need to use Windows or bootable ISO anymore. Check out the following resources:
- 10 Linux commands to know the system
- Linux Command To Find the System Configuration And Hardware Information
Other tutorials from nixCraft:
- How to install and edit desktop files on Linux (Desktop entries)
Linux comes with three commands for developers, sysadmins and users to
set up a hierarchy of applications, typically displayed as a menu. In
other words, these commands allow third-party software to add menu items
that work for all desktops. In addition, it allows Linux system
administrators to edit menus in a way that affects all desktops using
the following commands to install and edit desktop files on Linux to
make Desktop entries
- Update CentOS 8 Linux
As you know, Red Hat ended the security and update status for CentOS 8
Linux on 31/Dec/2021. As a result, you need to switch to either CentOS
Stream, or if you need 100% RHEL compatibility, read the following guide
about migrating CentOS 8 to various distros:
- How to upgrade from Ubuntu 20.04 LTS to 22.04 LTS
Ubuntu 22.04 LTS (“Jammy Jellyfish”) is released now. This tutorial
explains how to safely upgrade from Ubuntu 20.04 LTS (Focal Fossa) to
Ubuntu 22.04 LTS using the command-line and GUI options.
- How much does a Linux desktop OS cost?
Let us say you want to support Linux and buy an actual Linux desktop OS
like you buy Windows desktop operating system from the market. How much
would it cost price-wise, and what would you get in return when you buy
a yearly subscription?
- How to use htmlq to extract content from HTML files on Linux, macOS or FreeBSD
Most of us use love and use the jq command. It works on Linux or
Unix-like systems to extract data from JSON documents. Recently I found
htmlq, which is like jq and written in Rust lang. Imagine being able to
sed or grep for HTML data. We can search, slice, and filter HTML data
with htmlq. Let us see how to install and use this handy tool on Linux
or Unix and play with HTML data.
- How to install GIMP 2.10 on Ubuntu or Debian Linux
This quick tutorial explains how to download and install the latest
GIMP application on Ubuntu or Debian Linux and friend using the CLI.
- Debian 11 Set Up OpenVPN Server In 5 Minutes
I am a new Debian Linux 11 server user. How do I set up an OpenVPN
Server on Debian Linux version 11 server to shield my browsing activity
from bad guys on public Wi-Fi, and more?
- How to install aws cli on Linux
The AWS CLI is an essential tool for developers and sysadmin to
automate and interact with AWS cloud services. It is an open-source tool
built on the AWS SDL for Python. As a result, you no longer need to use
AWS Management Console. Instead, you can use Linux terminal and
commands for managing AWS resources. Let us see how to install AWS CLI
on Linux using the command-line options.
- How to install Chromium browser on Ubuntu Linux
Chromium is a free and open-source web browser project designed and
maintained by Google. Google Chrome browser uses Chromium codebase and
other proprietary components for additional features required to play
games, music and movies protected by DRM. This page explains how to
install Chromium browser on Ubuntu Linux 20.04 and 22.04 LTS desktop
computers.
- How to find out if Raspberry PI Linux OS needs a reboot
When you use the apt command to update the Raspberry Pi OS, no
notification indicates whether you need to reboot the Raspberry Pi 3 or 4
for Linux kernel updates. So say you have a lab of 4 RPi4 and managing
updates using ansible, then you need an automated way to find out if a
reboot is required to load a new Linux kernel on your Raspberry Pi OS.
- How to trim leading and trailing white space in bash
So I have this specific use case where I get data in a comma-separated
values (CSV) file. I pick up the company name, address, telephone,
email, and some other data from that file. Once data is collected, I
create a final pdf using a simple script. Unfortunately, data comes with
unwanted leading and trailing white spaces in each field. So my final
pdf file gets messed up because of those white space. Let us see how to
trim leading and trailing white space for a string in Bash running on
Linux or Unix machines.
- How to on enable kernel crash dump on Debian Linux
How do I enable kernel crash dump Debian Linux 9/10/11 using the
command-line option? How can I view crash reports on Debian machine?
- How To Convert AWS Route53 to Cloudflare Let’s Encrypt DNS challenge with acme.sh
I already wrote about setting up wildcard Let’s Encrypt SSL/TLS with
AWS Route53 DNS for Nginx or Apache. One of my clients decided to use
Cloudflare CDN and DNS at some point. They changed their DNS to
Cloudflare. Naturally, their wildcard certificate failed because it was
using Route53 DNS authentication to issue the certificate. Let us see
how to convert existing or expired TLS/SSL certification renewal from
AWS Route53 to Cloudflare.
- How to install YubiKey Manager GUI on Linux
One can use a hardware security key such as YubiKey for OTP or FIDO2
for additional security on Linux to protect disks, ssh keys, password
manager, web applications and more. Since I am a full-time Linux desktop
user, I thought today I would document how to install the YubiKey GUI
Manager to configure functionality on your YubiKey on a Linux desktop.
- How to install whois on Ubuntu / Debian Linux
While working on the client’s system, I found that the whois client was
missing. So I used that in one of my deployment scripts. I should add
that to cloud-init or Ansible, but the Ubuntu server was already
running.
- How to install and upgrade OpenSSH server on FreeBSD
Another day I wrote about setting up ssh public key password-less
authentication for FreeBSD server version 12/13 with an optional 2FA
hardware USB key (FIDO 2) for additional protection. However, FIDO2 and
key type ecdsa-sk and ed25519-sk are not supported by the OpenSSH client
and server version shipped with FreeBSD 12 or 13. But, fear not, we can
safely upgrade the OpenSSH version using ports collection. This page
explains how to install and configure the latest portable version of the
OpenSSH client and server on FreeBSD 13.
- How to set up ssh public key password-less on FreeBSD
SSH is an essential tool for login into the FreeBSD Unix box. Without
SSH, you cannot manage a remote server easily. Furthermore, SSH means
secure shell, and it is a replacement for insecure protocols such as
telnet. This page explains how to configure and set up ssh key-based
password-less authentication on a FreeBSD server or workstation.