Language Selection

English French German Italian Portuguese Spanish

today's howtos

Filed under
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.

More in Tux Machines

today's howtos

  • How to Change Comment Color in Vim – Fix Unreadable Blue Color

    Are you annoyed about the comment color in vim? The dark blue color of the comment is often hard to read. In this tutorial, we learn how to change the comment color in Vim. There are few methods we can use to look vim comment very readable.

  • How to Add Repository to Debian

    APT checks the health of all the packages, and dependencies of the package before installing it. APT fetches packages from one or more repositories. A repository (package source) is basically a network server. The term "package" refers to an individual file with a .deb extension that contains either all or part of an application. The normal installation comes with default repositories configured, but these contain only a few packages out of an ocean of free software available. In this tutorial, we learn how to add the package repository to Debian.

  • Making a Video of a Single Window

    I recently wanted to send someone a video of a program doing some interesting things in a single X11 window. Recording the whole desktop is easy (some readers may remember my post on Aeschylus which does just that) but it will include irrelevant (and possibly unwanted) parts of the screen, leading to unnecessarily large files. I couldn't immediately find a tool which did what I wanted on OpenBSD [1] but through a combination of xwininfo, FFmpeg, and hk I was able to put together exactly what I needed in short order. Even better, I was able to easily post-process the video to shrink its file size, speed it up, and contort it to the dimension requirements of various platforms. Here's a video straight out of the little script I put together: [...]

  • Things You Can And Can’t Do

    And it got me thinking about what you can and can’t do — what you do and don’t have control over.

  • allow-new-zones in BIND 9.16 on CentOS 8 Stream under SELinux

    We run these training systems with SELinux enabled (I wouldn’t, but my colleague likes it :-), and that’s the reason I aborted the lab: I couldn’t tell students how to solve the cause other than by disabling SELinux entirely, but there wasn’t enough time for that.

  • Will the IndieWeb Ever Become Mainstream?

    This is an interesting question, thanks for asking it, Jeremy. I do have some history with the IndieWeb, and some opinions, so let’s dive in.

    The short answer to the question is a resounding no, and it all boils down to the fact that the IndieWeb is really complicated to implement, so it will only ever appeal to developers.

  • How to Install CUPS Print Server on Ubuntu 22.04

    If your business has multiple personal computers in the network which need to print, then we need a device called a print server. Print server act intermediate between PC and printers which accept print jobs from PC and send them to respective printers. CUPS is the primary mechanism in the Unix-like operating system for printing and print services. It can allow a computer to act as a Print server. In this tutorial, we learn how to set up CUPS print server on Ubuntu 22.04.

Open Hardware: XON/XOFF and Raspberry Pi Pico

  • From XON/XOFF to Forward Incremental Search

    In the olden days of computing, software flow control with control codes XON and XOFF was a necessary feature that dumb terminals needed to support. When a terminal received more data than it could display, there needed to be a way for the terminal to tell the remote host to pause sending more data. The control code 19 was chosen for this. The control code 17 was chosen to tell the remote host to resume transmission of data.

  • Raspberry Pi Pico Used in Plug and Play System Monitor | Tom's Hardware

    Dmytro Panin is at it again, creating a teeny system monitor for his MacBook from scratch with help from our favorite microcontroller, the Raspberry Pi Pico. This plug-and-play system monitor (opens in new tab) lets him keep a close eye on resource usage without having to close any windows or launch any third-party programs. The device is Pico-powered and plugs right into the MacBook to function. It has a display screen that showcases a custom GUI featuring four bar graphs that update in real-time to show the performance of different components, including the CPU, GPU, memory, and SSD usage. It makes it possible to see how hard your PC is running at a glance.

Security Leftovers

How to Apply Accent Colour in Ubuntu Desktop

A step-by-step tutorial on how to apply accent colour in Ubuntu desktop (GNOME) with tips for Kubuntu and others. Read more