today's howtos
-
A one-liner to get root paths in my sitemap
Today's post is about a simple one-liner I wrote in bash. I have been playing around a lot with bash lately as I try to build a better sense of the right tools for various tasks. Why write a Python script when you can do what you want to do in the command line, using fewer lines of code? Particularly for text processing, the command line and tools like grep and awk save so much time. Over the last few weeks I have ran into four or five situations where a few commands and pipes turn an otherwise difficult task or at the least tedious task into something simple.
-
logcheck – egrep: trailing backslash (\)
When updating to FreeBSD 13.1, I started getting these messages from sysutils/logcheck:
egrep: trailing backslash (\)
This post will document how I tracked down the problem. It is occurring on several hosts.
-
Install Raspberry Pi OS's desktop environment over a Lite install
But every so often, I've had a Lite install that I wanted to switch to GUI, but I'm too lazy to pull the Pi out of wherever it's installed, pull the microSD card, and re-flash it with the full OS, and then re-run my automation on it to set up whatever I had running before.
And that's why it's nice to be able to just install the GUI on top of an existing Lite install!
-
How to Password-Protect Files and Folders on Linux
Here's a look at all the different methods you can use to password-protect files and folders on Linux.
-
Solving a bad ARP behavior on a Linux router
So, I recently switched my home router to Linux but had a network issues for devices that would get/renew their IP with DHCP. They were obtaining an IP, but they couldn't reach the router before a while (between 5 seconds to a few minutes), which was very annoying and unreliable.
After spending some time with tcpdump on multiple devices, I found the issue, it was related to ARP (the protocol to discover MAC addresses associate them with IPs).
-
How To Fix The Dpkg Interrupted Error In Linux? [Updated] | Itsubuntu.com
You will come across the dpkg error when you are using the apt-get command to install some packages or update existing software packages. If you have come across the dpkg interrupted error then we have a perfect solution for it.
-
How To Install Audacity on Ubuntu 22.04 LTS - idroot
In this tutorial, we will show you how to install Audacity on Ubuntu 22.04 LTS. For those of you who didn’t know, Audacity is a free and open-source audio recorder and editor for all major operating systems. Besides having an excellent audio editor, Audacity also offers several other features, including audio recording, fading in and out, and adding effects like normalization, amplification, trimming, and much more.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Audacity open-source audio recorder and editor on Ubuntu 22.04 (Jammy Jellyfish). You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.
-
How to Install NVIDIA Drivers on RHEL 9 | Mark Ai Code
“If you have installed Red Hat Enterprise Linux (RHEL) 9 on your computer and also have an NVIDIA GPU installed on your computer, the first thing you need do is install the NVIDIA GPU drivers for Red Hat Enterprise Linux (RHEL) 9.
In this post, I’ll teach you how to update the proprietary NVIDIA GPU drivers for Red Hat Enterprise Linux (RHEL) 9. So, let’s get this party started.
-
How do I Check if a Directory or File exists in a Bash Shell Script? - TREND OCEANS
One of the Linux users asked me: I’m creating a bash script in which I want to check if a directory or file is already presented to the user’s machine, and after getting the result, the next command or function should get executed.
Yes, it is possible to check whether a file or directory is presented to the file system by using a conditional statement in a bash script.
So let me show you how you can use this article to find a directory or file that exists in your system by using an if conditional statement, and before that, I’ll introduce you to a test command that will help you understand logic more clearly.
-
Lock Linux User Account after Multiple Failed Login Attempts - kifarunix.com
Follow through this guide to learn how to lock Linux user account after multiple failed login attempts. Linux through Pluggable Authentication Modules, PAM, can be configured to lock accounts after specific number of failed login attempts. Such are some of the security measures that aims at curbing brute force authentication attacks.
This can be achieve specifically through pam_faillock module. pam_faillock module maintains a list of failed authentication attempts per user during a specified interval and locks the account in case there were more than deny consecutive failed authentications.