Quantcast
Channel: nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED)

Image may be NSFW.
Clik here to view.

The repository ‘http://deb.debian.org/debian buster-backports Release’ no...

When you run the sudo apt update, you may see the following message or error on a Debian Linux:Err:5 http://deb.debian.org/debian buster-backports Release 404 Not Found [IP: 146.75.34.132 80] Reading...

View Article


Image may be NSFW.
Clik here to view.

How to configure AWS SES with Postfix MTA on Debian LinuxnixCraft

AWS SES (Amazon Simple Email Service) is a cloud-based email-sending service that is both reliable and cost-effective. This service is offered by Amazon Web Services. Postfix is a popular email server...

View Article


Image may be NSFW.
Clik here to view.

How to Upgrade Ubuntu 22.04 to 24.04 LTS: A Complete GuidenixCraft

Ubuntu 24.04 LTS (Noble Numbat) was launched on April 25th, 2024. This new version will be supported for five years until June 2029. The armhf architecture now provides support for the Year 2038...

View Article

How to Upgrade Ubuntu 22.04 to 24.04 LTS: A Complete GuideOpensource Flare✨

{nixCraft Patreon supporters content}Below is a sneak peek of this content! Ubuntu 24.04 LTS (Noble Numbat) was launched on April 25th, 2024. This new version will be supported for five years until...

View Article

Image may be NSFW.
Clik here to view.

How to add cron job entry for acme.shnixCraft

Recently, I had a learning experience with cron jobs and acme.sh. acme.sh is an excellent tool that simplifies the management of Let's Encrypt TLS (SSL) certificates. It makes obtaining and renewing...

View Article


Image may be NSFW.
Clik here to view.

How to add bash auto completion in Debian LinuxnixCraft

Bash is a command language interpreter compatible with sh. It can execute commands read from a file or keyboard. On Debian Linux, bash-completion is a set of shell functions that uses Bash's...

View Article

Image may be NSFW.
Clik here to view.

How to find hidden processes and ports on Linux/Unix/WindowsnixCraft

Unhide is a little handy forensic tool to find hidden processes and TCP/UDP ports by rootkits / LKMs or by another hidden technique. This tool works under Linux, Unix-like system, and MS-Windows...

View Article

How to perform find and replace operations within a visual selection in...

Here's a quick tip for vim users. You can perform find and replace operations within a visual selection in Vim for text or code block. Visual selection for finding and replacing text in Vim allows...

View Article


How to Pin Versions in Yum or Dnf for RHEL or CentOS LinuxnixCraft

CentOS, RHEL (Red Hat Enterprise Linux), Fedora and other clones of RHEL, such as Oracle, Alma, and Rocky, offer support for version pinning. This feature allows developers and system administrators to...

View Article


A Bash Script to Read All Command Line Arguments into an Array: Simplify...

If you are writing a Bash shell script, you should read command-line arguments into an array for some time. This allows us to process any number of arguments provided when the script is run. This makes...

View Article

Image may be NSFW.
Clik here to view.

How to copy permissions from one file to another on LinuxnixCraft

I need to copy or clone file ownership and permissions from another file on Linux. Is there a bash command line option to clone the user, group ownership and permissions on a file from another file on...

View Article

Image may be NSFW.
Clik here to view.

How to enable Debian 12 Backports repositorynixCraft

The Debian Linux 12 backports repository offers updated versions of software packages for Debian Stable releases. These packages are sourced from Testing (and sometimes Unstable) branches of Debian,...

View Article

Image may be NSFW.
Clik here to view.

Linux/Unix: pstree Command Examples: See A Tree Of ProcessesnixCraft

I am a new Linux user. How do I display the process on the Linux based server or desktop/laptop in easy to read tree format using bash shell prompt?Love this? sudo share_on: Twitter - Facebook -...

View Article


Image may be NSFW.
Clik here to view.

How to download a file with curl on Linux/Unix command linenixCraft

I am a new macOS Unix user. I am writing a small bash shell script. How do I download file directly from the command-line interface using curl? How can I download file with cURL on a Linux or Unix-like...

View Article

How to install dnscrypt-proxy on Debian Linux 11/12nixCraft

DNSCrypt-proxy is an open-source and free software designed to encrypt DNS traffic, thus protecting it from eavesdropping and manipulation. This is also useful to evade DNS censorship when...

View Article


Image may be NSFW.
Clik here to view.

How to add an IP alias to an EC2 instance on Debian/Ubuntu LinuxnixCraft

An IP alias on Debian, Ubuntu, or any other Linux distros refers to assigning multiple IP addresses to a single network interface. A single network interface card (NIC) can respond to multiple IP...

View Article

Image may be NSFW.
Clik here to view.

How to use find command to delete all *.log files created in last 90 days...

I have log files created whenever I patch or rebuild Linux containers. They are taking disk space. The logs are helpful if something fails. Otherwise, after a few weeks, those log files have no usage...

View Article


Image may be NSFW.
Clik here to view.

How to Set Up UFW Firewall on Ubuntu 24.04 LTS in 5 MinutesnixCraft

A Ubuntu 24.04 LTS comes with UFW (uncomplicated firewall) that protects the desktop or server against unauthorized access. UFW is an easy-to-use frontend app for a Linux packet filtering system called...

View Article

Image may be NSFW.
Clik here to view.

How to find ulimit for user on LinuxnixCraft

How can I find the correct ulimit values for a user account or process on Linux systems?Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - RedditThe post How to find ulimit for user...

View Article

Image may be NSFW.
Clik here to view.

TCPDump: Capture and Record Specific Protocols / Port TrafficnixCraft

How do I capture a specific protocol or port, such as 80 (HTTP) or 443 (HTTPS), using the TCPDump tool under Linux/UNIX? How do I record traffic with TCPDump and find problems later on with my network...

View Article

Image may be NSFW.
Clik here to view.

How to temporarily disable IPv6 in LinuxnixCraft

Sometimes, you may need to temporarily disable IPv6 in the Linux using net.ipv6.conf.all.disable_ipv6 kernel variable for testing purposes. You can use the sysctl command to turn IPv6 connectivity on...

View Article


Image may be NSFW.
Clik here to view.

How to reload .vimrc file without restarting vim on Linux/UnixnixCraft

I am a new vim text editor user. I usually load ~/.vimrc using :vs ~/.vimrc for configuration. Once edited my ~/.vimrc file I need to reload it without having to quit Vim session. How do I edit my...

View Article


Image may be NSFW.
Clik here to view.

How to uninstall packages marked “rc” on Debian / Ubuntu LinuxnixCraft

In Debian and Ubuntu Linux, an "rc" status package means the package has been uninstalled, but its configuration files remain on the disk and take up space. Sometimes, certain directories are also in...

View Article

Image may be NSFW.
Clik here to view.

How to upgrade Alpine Linux 3.19 to 3.20nixCraft

I am using Alpine Linux v3.18 or v3.19 with my LXD/Incus server. How do I upgrade Alpine Linux v3.19 to Alpine Linux v3.20? How can I upgrade Alpine Linux v3.18 to Alpine Linux v3.20?Love this? sudo...

View Article

Image may be NSFW.
Clik here to view.

SSH Authentication refused: bad ownership or modes for file...

I'm trying to login using ssh keys but server is only allows to login me using a password. The following message is logged into my Linux or Unix server /var/log/secure or /var/log/auth.log file:Feb 25...

View Article


Image may be NSFW.
Clik here to view.

sttr – Awesome Linux & Unix tool for transformation of the stringnixCraft

sttr demoThe sttr is a free and open-source command-line tool in Golang that lets you easily change and modify text. You can perform transformation operations on the string, such as hashing text,...

View Article

Image may be NSFW.
Clik here to view.

How to add interface to vnstat to database for monitoringnixCraft

vnStat is a network traffic monitor for Linux and Unix-like systems. It logs network traffic at different intervals and doesn't require root permissions to run. The implementation involves two...

View Article

Image may be NSFW.
Clik here to view.

How to find out AWS EC2 instances type over SSHnixCraft

AWS offers various instance types, and sometimes, you need to know which one you are using or which one has been deployed by someone else (another developer or sysadmin) for a project. Don't worry....

View Article

lnav – Awesome terminal log file viewer for Linux and UnixnixCraft

It is no secret that whether you are a developer or sysadmin, you need to use log files to troubleshoot errors on your Linux and Unix systems. You use tools like grep, tail, cat, or journalctl to view...

View Article



Image may be NSFW.
Clik here to view.

How to upgrade OpenSUSE 15.5 to 15.6 using the CLInixCraft

The most recent release of OpenSUSE Linux, version 15.6 "Leap," is now available. This version incorporates the SUSE Linux Enterprise (SLE) source and community developments, making it the ideal option...

View Article

Image may be NSFW.
Clik here to view.

How to install incus server on Debian 12/11nixCraft

Incus is a free and open-source project for the next-gen container management platform. It is a fork of LXD (the container hypervisor). It can manage both Linux containers and virtual machines. Let us...

View Article

Shell script to monitor MariaDB replication and send email alert about server...

Here is a simple shell script to notify secondary read-only replica (slave) MariaDB server health status failure via email and push notification. Master-slave data replication allows you to copy...

View Article

Image may be NSFW.
Clik here to view.

How to install and configure sudo on Debian LinuxnixCraft

The minimal version of Debian Linux 12/11 does not support sudo. When performing a network installation for Debian, the usual approach is to use the minimum version, which only installs the essential...

View Article


Image may be NSFW.
Clik here to view.

Shell script to see Time-To-Live (TTL) for a DNS record on Linux, Unix, macOS...

TTL is an acronym for Time-To-Live (TTL) in DNS. It sets the time in seconds that a DNS record is allowed to be cached by DNS resolvers (caching server) before it needs to be fetched again from the...

View Article

How to shutdown FreeBSD laptop when running out of battery powernixCraft

Email alert example before FreeBSD-based laptop will be shutdown by the script After my Raspberry PI died, I decided not to get a new one immediately. Instead, I turned the older laptop into a FreeBSD...

View Article

Image may be NSFW.
Clik here to view.

Linux shell script to reduce PDF file sizenixCraft

Here is a handy and useful Linux and Unix shell script that reduce PDF file size using Ghostscript. No need to upload your PDF file to the shady third-party website. Just do it from the terminal. I...

View Article


Image may be NSFW.
Clik here to view.

How To check LXD/Incus container BTRFS disk usage on LinuxnixCraft

Here is a quick and dirty shell script I put to check LXD or Incus container size and how much space they are taking on the BTRFS subvolume. Naturally, you must run the script as a root user, and LXD...

View Article


Image may be NSFW.
Clik here to view.

Shell script to set up an LXD / Incus (Linux Containers) lab for testing...

LXD or Incus is a Linux operating system-level container system. You can build over 25+ Linux distros for testing, fun, and profit. You can even run GUI apps inside those containers and get output...

View Article

Image may be NSFW.
Clik here to view.

Linux Copy One Hard Disk to Another Using dd CommandnixCraft

How can I copy one hard disk to another using the dd, ddrescue, or dcfldd commands?Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - RedditThe post Linux Copy One Hard Disk to...

View Article

Image may be NSFW.
Clik here to view.

Linux / UNIX: DNS Lookup CommandnixCraft

How do I perform DNS lookup under Linux, UNIX, or Apple macOS (OS X) operating systems without using 3rd party websites for troubleshooting DNS usage?Love this? sudo share_on: Twitter - Facebook -...

View Article

Image may be NSFW.
Clik here to view.

Linux turn OFF password expiration / agingnixCraft

The /etc/shadow file stores the actual password in encrypted format using a hash (salted) function for the user's account with additional properties related to the user passwords, such as password...

View Article


Image may be NSFW.
Clik here to view.

Linux / UNIX View Only Configuration File Directives ( Uncommented Lines of a...

Most Linux and UNIX-like system configuration files are documented using comments, but sometimes I just need to see a line of configuration text in a config file. How can I view just the uncommented...

View Article

Image may be NSFW.
Clik here to view.

How do I unzip multiple / many files under Linux?nixCraft

I have lots of files in a directory called /disk2/images/. All files are in zip file format, so I am using the following command to extract zip files:     unzip *.zip The command result into an error...

View Article


Image may be NSFW.
Clik here to view.

zcommands: Read gzip Compressed Text Files On a Fly on Linux and UnixnixCraft

Linux and Unix like operating systems comes with z* commands. These commands allow you to read gzip compressed text files using zless, zcat, zmore, and friends commands. The gzip command reduces the...

View Article

Image may be NSFW.
Clik here to view.

How to install kvm-ok on Debian or Ubuntu LinuxnixCraft

The KVM-ok command command will tell you if your Debian or Ubuntu Linux-powered server can host hardware-accelerated KVM virtual machines. KVM (Kernel-based Virtual Machine) is a free and open-source...

View Article


Image may be NSFW.
Clik here to view.

How to find hard disk (SSD) serial numbers in LinuxnixCraft

You need to use the smartctl command to display the hard disk (SSD) serial numbers in Linux. This is useful when changing your hard disk if it goes bad. Love this? sudo share_on: Twitter - Facebook -...

View Article

Image may be NSFW.
Clik here to view.

How to install vnstat on Debian 12/11 to monitor network interface bandwidth...

Do you need to keep track of the network traffic (bandwidth) usage for the Network interface controller (NIC) of your Debian Linux-based cloud or bare metal server? Look no forward. Try the vnStat, a...

View Article

Image may be NSFW.
Clik here to view.

How to enable mouse to copy & paste in vimnixCraft

Some Linux distro like Debian or specific BSD variants provide very little configuration support for mouse out of the box for Vim. Let us see how to paste in Vim using a mouse by enabling support,...

View Article

Image may be NSFW.
Clik here to view.

MySQL Change root Password CommandnixCraft

How do I change MySQL root password under Linux, FreeBSD, OpenBSD and UNIX-like like operating system over the ssh session?Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - RedditThe...

View Article


Image may be NSFW.
Clik here to view.

How to run Docker inside Incus containersnixCraft

Incus and Docker both use Linux kernel features to containerize your applications. Incus is best suited when you need system-level containers that act like traditional VMs and provide a persistent...

View Article