Сборщик RSS-лент

Linux Copy One Hard Disk to Another Using dd Command

LNX tutorial - ср, 11/09/2024 - 19:27
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
Категории: FOSS News

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

LNX tutorial - ср, 11/09/2024 - 19:27
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
Категории: FOSS News

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

LNX tutorial - ср, 11/09/2024 - 19:27
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
Категории: FOSS News

Linux shell script to reduce PDF file size

LNX tutorial - ср, 11/09/2024 - 19:27
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
Категории: FOSS News

How to shutdown FreeBSD laptop when running out of battery power

LNX tutorial - ср, 11/09/2024 - 19:27
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 server. I use this server for Git, backup via ZFS snapshots, running Debian/RHEL VM using bhyve, side project web server […] 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
Категории: FOSS News

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

LNX tutorial - ср, 11/09/2024 - 19:27
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
Категории: FOSS News

How to install and configure sudo on Debian Linux

LNX tutorial - ср, 11/09/2024 - 19:27
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
Категории: FOSS News

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

LNX tutorial - ср, 11/09/2024 - 19:27
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
Категории: FOSS News

How to install incus server on Debian 12/11

LNX tutorial - ср, 11/09/2024 - 19:27
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
Категории: FOSS News

How to upgrade OpenSUSE 15.5 to 15.6 using the CLI

LNX tutorial - ср, 11/09/2024 - 19:27
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 for a stable Linux experience for users, developers, and system administrators. This page provides instructions on upgrading from OpenSUSE version 15.5 to 15.6 using the command-line interface (CLI). Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to upgrade OpenSUSE 15.5 to 15.6 using the CLI appeared first on nixCraft. 2024-06-30T11:03:25Z 2024-06-30T11:03:25Z Vivek Gite
Категории: FOSS News

lnav – Awesome terminal log file viewer for Linux and Unix

LNX tutorial - ср, 11/09/2024 - 19:27
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 log files. However, you may need help with so many log files. These essential Unix tools are suitable for basic text but fall short when dealing with many log files. You can get tired from sifting through endless lines of log files. The lnav utility is here to the rescue! It is a powerful log file viewer that goes beyond the basics. It understands your logs by identifying timestamps, log levels, and other vital details. You can run SQLite SQL queries against your standard log files and build reports for your needs. Let us see how to install and use the lnav tool quickly. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post lnav – Awesome terminal log file viewer for Linux and Unix appeared first on nixCraft. 2024-06-16T11:04:42Z 2024-06-16T11:04:42Z Vivek Gite
Категории: FOSS News

How to find out AWS EC2 instances type over SSH

LNX tutorial - ср, 11/09/2024 - 19:27
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. Here are some commands to find the EC2 instance type over SSH without logging into the AWS console. These commands works with any Linux distro or FreeBSD Unix systems. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to find out AWS EC2 instances type over SSH appeared first on nixCraft. 2024-05-26T11:51:12Z 2024-05-26T11:51:12Z Vivek Gite
Категории: FOSS News

How to add interface to vnstat to database for monitoring

LNX tutorial - ср, 11/09/2024 - 19:27
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 commands: vnstat for querying traffic information and vnstatd for data retrieval and storage. Let's see how to add a network interface to vnstat after installation for monitoring purposes. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to add interface to vnstat to database for monitoring appeared first on nixCraft. 2024-05-26T05:56:00Z 2024-05-26T05:56:00Z Vivek Gite
Категории: FOSS News

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

LNX tutorial - ср, 11/09/2024 - 19:27
sttr demo The 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, string manipulation, and more. sttr is beneficial for developers and *nix users requiring swift modification to strings or files directly via the command line or TUI. It is helpful in your scripting, data processing, and automation tasks at the CLI. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post sttr – Awesome Linux & Unix tool for transformation of the string appeared first on nixCraft. 2024-05-24T21:17:45Z 2024-05-24T21:17:45Z Vivek Gite
Категории: FOSS News

SSH Authentication refused: bad ownership or modes for file /home/user/.ssh/authorized_keys

LNX tutorial - ср, 11/09/2024 - 19:27
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 06:36:50 ns5 sshd[26681]: Authentication refused: bad ownership or modes for file /home/user/.ssh/authorized_keys2 Here is another message: May 24 18:28:35 ls-www-1 sshd[531320]: Connection closed by 18.1.2.3 port 43640 [preauth] May 24 18:28:44 ls-www-1 sshd[531322]: Authentication refused: bad ownership or modes for file /home/admin/.ssh/authorized_keys May 24 18:28:44 ls-www-1 sshd[531322]: Connection closed by authenticating user admin 18.1.2.3 port 43650 [preauth] How do I fix this problem? Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post SSH Authentication refused: bad ownership or modes for file /home/user/.ssh/authorized_keys appeared first on nixCraft. 2024-05-24T19:23:28Z 2024-05-24T19:23:28Z Vivek Gite
Категории: FOSS News

How to upgrade Alpine Linux 3.19 to 3.20

LNX tutorial - ср, 11/09/2024 - 19:27
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 share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to upgrade Alpine Linux 3.19 to 3.20 appeared first on nixCraft. 2024-05-24T11:25:52Z 2024-05-24T11:25:52Z Vivek Gite
Категории: FOSS News

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

LNX tutorial - ср, 11/09/2024 - 19:27
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 the /var/ directory. When you type the sudo apt remove pkg1 command, it deletes most of the data, but config files are left alone in case you reinstall that package again. You can free up disk space by removing unwanted config files. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to uninstall packages marked “rc” on Debian / Ubuntu Linux appeared first on nixCraft. 2024-05-22T09:30:57Z 2024-05-22T09:30:57Z Vivek Gite
Категории: FOSS News

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

LNX tutorial - ср, 11/09/2024 - 19:27
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 ~/.vimrc file and reload it without having to restart Vim on Linux or Unix-like system? Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to reload .vimrc file without restarting vim on Linux/Unix appeared first on nixCraft. 2024-05-19T11:03:00Z 2024-05-19T11:03:00Z Vivek Gite
Категории: FOSS News

How to temporarily disable IPv6 in Linux

LNX tutorial - ср, 11/09/2024 - 19:27
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 or off without rebooting the system. For example, observe how your app or network reacts when IPv6 connectivity is suddenly lost and only IPv4 is available. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to temporarily disable IPv6 in Linux appeared first on nixCraft. 2024-05-18T20:18:54Z 2024-05-18T20:18:54Z Vivek Gite
Категории: FOSS News

TCPDump: Capture and Record Specific Protocols / Port Traffic

LNX tutorial - ср, 11/09/2024 - 19:27
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 or server issues? Let's dive into the nitty-gritty of capturing and analyzing your network traffic for trapshooting network and server issues. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post TCPDump: Capture and Record Specific Protocols / Port Traffic appeared first on nixCraft. 2024-05-17T21:00:03Z 2024-05-17T21:00:03Z Vivek Gite
Категории: FOSS News

Страницы