nixCraft

Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux Tutorials and Tips nixCraft 2024-11-01T20:36:37Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux Tutorials and Tips nixCraft 2024-11-01T20:36:37Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux Tips, Hacks, Tutorials, And Ideas In Blog nixCraft 2024-12-12T11:45:17Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-18T05:44:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-12-09T16:20:44Z Linux Tips, Hacks, Tutorials, And Ideas In Blog nixCraft 2024-12-12T11:45:17Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-11-28T13:45:18Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-11-27T19:07:02Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-11-16T21:38:35Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-11-16T06:54:36Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-09-27T19:58:58Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-09-21T12:35:47Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-09-15T21:58:57Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-09-09T21:07:13Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-08-16T12:06:18Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-08-15T21:42:28Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-07-30T22:56:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-07-28T11:28:39Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-07-26T18:07:58Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-07-25T23:07:33Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-07-25T12:54:43Z Linux Tutorials and Tips nixCraft 2024-11-01T20:36:37Z Linux Tutorials and Tips nixCraft 2024-11-01T20:36:37Z Linux Tutorials and Tips nixCraft 2024-11-01T20:36:37Z Linux Tutorials and Tips nixCraft 2024-11-01T20:36:37Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-07-23T08:25:44Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-06-30T11:09:23Z Patreon members-only guides from nixCraft Opensource Flare✨ 2024-04-26T18:27:47Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-06-12T05:58:33Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-05-26T05:56:00Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-05-24T19:24:14Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-05-24T11:25:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-05-22T09:30:57Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-05-19T11:04:42Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-05-18T20:18:54Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-05-17T21:19:24Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-05-16T21:59:44Z nixCraft Linux and Unix Sysadmin Blog - Recently updated posts nixCraft Updated Tutorials/Posts 2024-02-14T06:12:05Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-05-15T10:11:26Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-05-15T06:56:03Z Linux / Unix tutorials for new and seasoned sysadmin || developers nixCraft 2024-05-14T20:43:57Z
Updated: 1 hour 42 min ago

How to run Docker inside Incus containers

1 hour 42 min ago
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 developer experience. On the other hand, Docker containers are ephemeral, i.e., temporary in nature. All files created inside Docker containers are lost when your Docker container is stopped or removed unless you stored them using volumes in different directories outside Docker. Docker is created as a disposable app deployment system. Incus containers are not typically created as disposables, and data is kept inside when they are stopped. Because of the Linux kernel support nesting feature, you can run Docker inside Incus. This page explains how to run Docker inside Incus containers. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to run Docker inside Incus containers appeared first on nixCraft. 2024-12-18T05:44:26Z 2024-12-18T05:44:26Z Vivek Gite

MySQL Change root Password Command

1 hour 42 min ago
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 - Reddit The post MySQL Change root Password Command appeared first on nixCraft. 2024-12-09T16:19:00Z 2024-12-09T16:19:00Z Vivek Gite

How to enable mouse to copy & paste in vim

1 hour 42 min ago
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, which is useful for new developers and sysadmin coming from Windows background. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to enable mouse to copy & paste in vim appeared first on nixCraft. 2024-11-28T13:44:35Z 2024-11-28T13:44:35Z Vivek Gite

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

1 hour 42 min ago
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 free and open-source console-based network traffic monitor that keeps a log of 5-minute intervals, hourly, daily, monthly, and yearly network traffic for the selected interface. Once installed, vnStat can be used even without root permissions on most systems. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to install vnstat on Debian 12/11 to monitor network interface bandwidth usage appeared first on nixCraft. 2024-11-27T19:07:02Z 2024-11-27T19:07:02Z Vivek Gite

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

1 hour 42 min ago
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 - LinkedIn - Whatsapp - Reddit The post How to find hard disk (SSD) serial numbers in Linux appeared first on nixCraft. 2024-11-16T21:38:35Z 2024-11-16T21:38:35Z Vivek Gite

How to install kvm-ok on Debian or Ubuntu Linux

1 hour 42 min ago
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 virtualization technology that is used with every Linux kernel. In other words, KVM will make your Linux computer into a hypervisor, allowing you to run multiple isolated virtual machines (VMs) on a single physical machine. However, KVM depends upon CPU hardware virtualization extensions like Intel VT-x or AMD-V to provide high-performance virtual machines. This support must be enabled in the BIOS. Apart from that, some cloud service providers also allow nested virtualization that will help you to run VMs inside your instances. However, this may not be enabled in BIOS or instance configuration. Thus, you need to install the kvm-ok command to determine whether such support exists. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to install kvm-ok on Debian or Ubuntu Linux appeared first on nixCraft. 2024-11-16T06:54:11Z 2024-11-16T06:54:11Z Vivek Gite

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

1 hour 42 min ago
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 size of the files using Lempel-Ziv coding (LZ77). Whenever possible, each file is replaced by one with the extension .gz while keeping the same ownership modes, access, and modification times. z* commands have some cool usage too, such as display the current time in different zonename. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post zcommands: Read gzip Compressed Text Files On a Fly on Linux and Unix appeared first on nixCraft. 2024-11-01T20:34:07Z 2024-11-01T20:34:07Z Vivek Gite

How do I unzip multiple / many files under Linux?

1 hour 42 min ago
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 which read as follows:      caution: filename not matched How do I unzip multiple or many zip files under a Linux/Unix-like system? Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How do I unzip multiple / many files under Linux? appeared first on nixCraft. 2024-09-27T19:56:29Z 2024-09-27T19:56:29Z Vivek Gite

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

1 hour 42 min ago
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 configuration file directives from squid.conf or httpd.conf file? How can I strip out comments and blank lines on a Linux or Unix-like system? Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post Linux / UNIX View Only Configuration File Directives ( Uncommented Lines of a Config File ) appeared first on nixCraft. 2024-09-21T12:33:38Z 2024-09-21T12:33:38Z Vivek Gite

Linux turn OFF password expiration / aging

1 hour 42 min ago
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 expiration date or password aging. The /etc/passwd stores usernames and their properties, such as home directory, login shell, and more. The password expiration information for a user is contained in the last six fields. The Linux password expiration for a select user can be disabled by editing the /etc/shadow file. However, I recommend using the chage command for safety reasons. The chage command changes the number of days between password changes and the last password change date. The Linux system uses this information to determine when users must change their passwords. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post Linux turn OFF password expiration / aging appeared first on nixCraft. 2024-09-20T11:46:01Z 2024-09-20T11:46:01Z Vivek Gite

Linux / UNIX: DNS Lookup Command

1 hour 42 min ago
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 - LinkedIn - Whatsapp - Reddit The post Linux / UNIX: DNS Lookup Command appeared first on nixCraft. 2024-09-13T11:37:45Z 2024-09-13T11:37:45Z Vivek Gite

Linux Copy One Hard Disk to Another Using dd Command

1 hour 42 min ago
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 - Reddit The post Linux Copy One Hard Disk to Another Using dd Command appeared first on nixCraft. 2024-09-09T20:04:33Z 2024-09-09T20:04:33Z Vivek Gite

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

1 hour 42 min ago
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 displayed back to your X display easily. For example, you can run Firefox in one Linux container for banking needs with custom add-ons, including specific firewall rules just for allowing outgoing banking and nothing else. You can have another container to run Chromium/Edge/FF for social media. Of course, it is not a replacement for something like Qubes OS, but you can do many things in an isolated environment. You can try a new Linux distro without the VM's overheads and test new features offered by that distro. All Linux containers will share the same Linux kernel and hardware devices as your GPU. Here is a quick shell script to build a quick lab to test various Linux distros. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post Shell script to set up an LXD / Incus (Linux Containers) lab for testing purpose appeared first on nixCraft. 2024-08-16T12:06:18Z 2024-08-16T12:06:18Z Vivek Gite

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

1 hour 42 min ago
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 or Icnus must be configured with BTRFS storage backend on Linux operating systems. See how to set up and install LXD on Ubuntu 20.04 LTS or installing Incus on Debian 12/11 using the apt command. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How To check LXD/Incus container BTRFS disk usage on Linux appeared first on nixCraft. 2024-08-15T21:42:09Z 2024-08-15T21:42:09Z Vivek Gite

Linux shell script to reduce PDF file size

1 hour 42 min ago
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 tested it with both CentOS and Ubuntu/Debian Linux. It should work with macOS, FreeBSD and other Unix-like systems as long as you have the Ghostscript installed. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post Linux shell script to reduce PDF file size appeared first on nixCraft. 2024-07-30T22:56:26Z 2024-07-30T22:56:26Z Vivek Gite

How to shutdown FreeBSD laptop when running out of battery power

1 hour 42 min ago
Email alert example before FreeBSD-based laptop will be shutdown by the script Email alert example before FreeBSD-based laptop will be shutdown by the script Email alert example before FreeBSD-based laptop will be shutdown by the script Email alert example before FreeBSD-based laptop will be shutdown by the script Email alert example before FreeBSD-based laptop will […] Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to shutdown FreeBSD laptop when running out of battery power appeared first on nixCraft. 2024-07-28T11:28:02Z 2024-07-28T11:28:02Z Vivek Gite

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

1 hour 42 min ago
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 authoritative name server. In other words, longer TTL can reduce the load on authoritative DNS servers and improve response times by keeping records in the cache longer. The shorter TTL is useful for frequently changing DNS records, as it ensures that updates are propagated quickly across the Internet. Say you want to see the Time-To-Live (TTL) value for a given DNS record for A, AAAA, and MX. Here is a sample shell script that works on Linux, Unix, and macOS. You must have the bash and dig command installed. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post Shell script to see Time-To-Live (TTL) for a DNS record on Linux, Unix, macOS and FreeBSD appeared first on nixCraft. 2024-07-26T18:05:44Z 2024-07-26T18:05:44Z Vivek Gite

How to install and configure sudo on Debian Linux

1 hour 42 min ago
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 packages. Most Linux container images based upon Debian also skip sudo, and if your project needs sudo, then read on how to install and configure sudo and grant access to a user on a Debian Linux version 12/11. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to install and configure sudo on Debian Linux appeared first on nixCraft. 2024-07-25T23:06:18Z 2024-07-25T23:06:18Z Vivek Gite

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

1 hour 42 min ago
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 databases to multiple MariaDB servers. It is useful for backup, data recovery, load balancing, and much more. See how to configure SSL-protected MariaDB replication between a master and slave server. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post Shell script to monitor MariaDB replication and send email alert about server health status appeared first on nixCraft. 2024-07-25T12:51:45Z 2024-07-25T12:51:45Z Vivek Gite

How to install incus server on Debian 12/11

1 hour 42 min ago
Patreon subscribers can download the PDF version here and support independent content creators. 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 see how to install the stable version of the Incus server on Debian 11 or 12 and deploy both containers and VMs for fun and profit. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to install incus server on Debian 12/11 appeared first on nixCraft. 2024-07-23T08:25:44Z 2024-07-23T08:25:44Z Vivek Gite
Comment