nixCraft – Telegram
nixCraft
126 subscribers
1.11K links
RSS to Channel
Download Telegram
{Updated} Forgot to edit Linux or Unix/macOS file as sudo user? Want to overwrite without quitting vim on Linux/Unix? Try vim cmd trick and save time.The post How To Save A File In Vim / Vi Without Root Permission With sudo appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/BSWnTZO
WireGuard is an open-source, free, modern, and fast VPN with state-of-the-art cryptography. It is like OpenSSH in simplicity and uses private and public keys. Hence, it is more straightforward as compared to IPSec and OpenVPN. Initially released for the Linux kernel, it works with other operating systems. This page explains how to install and set up WireGuard VPN on Amazon Linux EC2 or Lightsail server. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to Set Up WireGuard VPN on Amazon Linux 2 appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/WdHEBmR
{Updated} Alpine Linux 3.16.0 has been released. Here is how to upgrade from version 3.15.xx to 3.16.0.The post How to upgrade Alpine Linux 3.15 to 3.16 appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/NurBCvF
Today, I will share one helpful tip that allows FreeBSD developers and sysadmin to make a backup list of installed all FreeBSD packages and then restore it. Hence, this is useful for disaster recovery (DR) or simply rebuilding a new server. It will save you time. Related: How to make a list of installed FreeBSD […] Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to backup & restore a list of installed FreeBSD packages appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/ltBsMAj
{Updated} Want to do a reverse DNS (rDNS) Lookup in Linux, macOS, *BSD or Unix/WSL/Windows to find scammers/phishers/spammer using a forward confirm. Try these tips.The post How To Test or Check Reverse DNS on a Linux / Unix appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/MaH6Esg
usbgurd You deployed a perfect firewall and other network security policies preventing unauthorized access to the user's desktop computer over a network. However, you still need to block USB device access. We can configure a Linux desktop security policy to protect your computer against rogue USB devices (a.k.a. BadUSB) by implementing essential allow and blocklisting capabilities based on device attributes. For instance, I can define what kind of USB devices are authorized and how a USB device interacts with the Linux system. For example, I can define policy allowing Yubikey with serial number "XYZ" and USB LTE modem with serial # "ABC." Every other USB device access is denied by default. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to protect Linux against rogue USB devices using USBGuard appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/OzEZVHi
Today I will talk about a common problem faced by many Linux or Unix sysadmins and developers. Typically modern apps and security devices heavily depend upon APIs and lists that feed data in JSON format. For example, a list of spamming or VPN CIDRs or a good list of verified bots' IP CIDRs is in JSON format. If they accept JSON format, you can take this list and upload it to your router or WAF. Unfortunately, not all devices accept JSON format. Hence, we can take JSON format and convert it to CSV format per our needs. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to convert JSON to CSV using Linux / Unix shell appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/ezhtprv
While looking into the nginx PHP error log file fixing unrelated issues, I noticed I was spammed with the following message: [28-Jul-2022 10:27:13 UTC] PHP Warning: Constant ABSPATH already defined in /home/lighttpd/cyberciti.biz/http/faq/wp-config.php on line 73 [29-Jul-2022 10:29:13 UTC] PHP Warning: Constant ABSPATH already defined in /home/lighttpd/cyberciti.biz/http/faq/wp-config.php on line 73 31-Jul-2022 10:31:13 UTC] PHP Warning: Constant ABSPATH already defined in /home/lighttpd/cyberciti.biz/http/faq/wp-config.php on line 73 [-Jul-2022 10:32:38 UTC] PHP Warning: Constant ABSPATH already defined in /home/lighttpd/cyberciti.biz/http/faq/wp-config.php on line 73 [31-Jul-2022 10:33:13 UTC] PHP Warning: Constant ABSPATH already defined in /home/lighttpd/cyberciti.biz/http/faq/wp-config.php on line 73 I was surprised by this as it was filling up disk space for no good reasons. So I decided to look into it. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post PHP Warning: Constant ABSPATH already defined in wp-config.php appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/prqsJmu
As you may know, email spoofing allows attackers to pose as someone else to gain illegal profit. For example, I only use webmaster@cyberciti.biz for communication, but someone might create a spoofed-up email, say info@opensourceflare.com, to trick someone. This is called email spoofing with fake headers as follow:
Date: Thu, 24 Oct 2021 12:46:10
From: nixCraft
MySQL version 8.0 is a free and open-source database system used by most web applications and sites on the Internet. Typically MySQL is part of the LAMP (Linux, Apache, MySQL, Perl/Python/PHP) stack. MySQL heavily uses popular open-source software such as WordPress, MediaWiki, and others as a database storage engine. Let us see how to install MySQL server version 8.x on Ubuntu 22.04 LTS Linux server, including settings up a new database, users and fine tuning server config. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to install MySQL server on Ubuntu 22.04 LTS Linux appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/BO0WRdr
Sometimes you need to use the ls command on your Linux or Unix machine and match the pattern, interpreting upper- and lowercase letters as the same. In other words, I tell ls to find and list files regardless of their case insensitive. For instance, I am going to tell ls command command to ignore the case so that it can match files such as: $ ls *service*.pdf SERVICE.pdf DELL-Service-M6700.pdf hp-printer-Service-Manual.pdf In this quick tip, I explain how to match case insensitive patterns with the ls command on your Linux, macOS, *BSD and Unix-like system. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to run ls command case insensitive mode on Linux/Unix appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/OcBWuoK
So like many solo developers, I am tight on resources, especially money-wise. I have two AWS EC2 VMs running as WireGuard VPN on Amazon Linux for personal usage, and another one is my dev machine with Python, PHP and stuff. These are tiny VMs with just 512MB ram. The main problem is my little VM powered by CentOS or Amazon Linux 2 runs out of memory when I run "sudo yum update". The BaseOS repo from RHEL and co is just too big. It requires a minimum of 3 GB ram. So I will also get a segfault when running out of memory as described here. I believe there is a dnf bug open in RHN. So I decided to take matters into my hands and add 8GB of swap space on Amazon Linux 2 EC2 / Lightsail VM running at AWS to fix issues. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to add swap to AWS EC2/Lightsail Amazon Linux instance appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/EK4Rt69
A Ubuntu 22.04 LTS comes with UFW (uncomplicated firewall) that protects the desktop or server against unauthorized access. UFW is easy to use frontend app for a Linux packet filtering system called Netfilter. Traditionally Netfilter rules are set up or configured using the iptables command by developers and sysadmins. However, new Ubuntu Linux users and developers unfamiliar with firewall concepts find Netfilter syntax confusing. Hence, the ufw project provides easy to use frontend for Ubuntu 22.04 LTS Linux server and desktop. It is so super easy to set up. You can configure UFW in under 5 minutes and secure your host. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post Ubuntu 22.04 LTS Set Up UFW Firewall in 5 Minutes appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/lhjCnz7
{Updated} All HTTP error codes starting with 4xx are generated because of client browser requests. A 403 error code means the client browser (or the person trying to access your site) cannot access the requested URL. Many reasons can cause it. Let us see how Linux, Unix developers, and sysadmin can fix Apache 403 Forbidden errors.The post Apache 403 Forbidden Error and Solution appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/IUacY8u
Right now, the most advanced OpenSUSE version is 15.4. It is an opportunity for desktop and server users running the previous 15.3 release to update to the latest software stack. The procedure for upgrading OpenSUSE 15.3 to 15.4 is simple to follow. This tutorial will walk you through the process of upgrading OpenSUSE 15.3 to 15.4. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to upgrade OpenSUSE 15.3 to 15.4 using the CLI appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/j2yAWcz
{Updated} As a Unix sysadmin, sometimes I notice that df and du output are different from each other. So what to do when df and du report different usage? My older troubleshooting blog post from the 2000s is still valid in 2022.The post Why are the results of UNIX, BSD and Linux command 'df' and 'du' different sometimes? appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/3DmOPot
{Updated} The pydf command displays the amount of used and available space on your file systems, just like df command, but in colors. The output format is completely customizable.The post pydf - Linux tool to see colourised filesystem disk space usage appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/3hYio4q
Do you want to know which version of Raspberry Pi OS is running on your hardware? Here is how to find the Raspberry Pi OS version including hardware details such as CPU, RAM and model using the command-line option. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to see Raspberry Pi OS version on Raspberry PI appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/SdHP06x
{Updated} In this tip, I will explain how we can iterate over a list of files with blank or white spaces in their names. This is a common problem in bash, where space is usually interpreted as a delimiter when using with for loop.The post BASH Shell: For Loop File Names With Spaces appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/OoLPeKs
FreeBSD default comes with a drill command to see information about DNS. The userspace tools for FreeBSD come from the latest version of the BIND-TOOLs package. It includes delv, dig, host, nslookup, and nsupdate. Let us see how to search and install dig, delv, and host commands on FreeBSD using the pkg command. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to install dig, delv, host commands on FreeBSD appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/qmoyUgC
I have a tutorial that explains the basics of the SSH client configuration file and some of the most common configuration options for Linux and Unix developers or sysadmin. In this quick tip, I will explain how and why you sometimes need to ignore or exclude the ssh client config file under Linux, Unix, *BSD and macOS. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How to tell ssh client to ignore ssh config file appeared first on nixCraft.

via nixCraft: Linux Tips, Hacks, Tutorials, And Ideas In Blog Format (RSS/FEED) https://ift.tt/it8gIyO