Bash Append Text To a Variable (Concatenate Strings)nixCraft Updated...
{Updated} How do I append additional text a variable? For e.g., I've a vech set as follows: vech='London', I would like to add (append) 'Bus' word to '$vevh' under UNIX or Linux shell scripting using...
View ArticleHow to get and extract filename extension in BashnixCraft
I have a valuable tip for you on extracting the filename and extension in Bash when using Linux, macOS, FreeBSD, or Unix-like systems. It's quick and easy to follow.Love this? sudo share_on: Twitter -...
View ArticleHow to decode BASE64 string in Linux and UnixnixCraft
A long time ago, I wrote a script or config file that included BASE64 encoded string like...
View ArticleHow To Update macOS Using Command Line Software Update ToolnixCraft Updated...
{Updated} Learn how to update macOS using the command line and many Mac machines using ssh.The post How To Update macOS Using Command Line Software Update Tool appeared first on nixCraft.
View ArticleHow to reboot Alpine Linux using Ansible when kernel is updatednixCraft
You can use the reboot or shutdown -r now to reboot the Linux system. However, this doesn't scale well if you have many Alpine Linux servers (or clusters based upon Alpine Linux) and need to reboot the...
View ArticleHow do I list all USB devices in Linux?nixCraft Updated Tutorials/Posts
{Updated} Need to find all USB devices connected to your Linux laptop or computer? Simply use the lsusb command (LIST USB) and other CLI and GUI tools in Linux.The post How do I list all USB devices in...
View ArticleHow to install vim in Alpine LinuxnixCraft
Learn how to install Vim, the most popular text editor for server-based environments, on Alpine Linux using the command "apk add vim" command and Docker or LXD (Linux container) image.Love this? sudo...
View ArticleHow to install wget on Fedora Linux using the dnf commandnixCraft
Wget is a command-line tool to download files from the Internet or local servers. It is not a graphical user interface (GUI) program, and it must be used by typing commands into a terminal application....
View ArticleFind files that do not have any owners or do not belong to any user under...
{Updated} Here is a Linux, Unix, *BSD and macOS command to search the entire system for files with no group or user.The post Find files that do not have any owners or do not belong to any user under...
View ArticleHow to block AI Crawler Bots using robots.txt filenixCraft
Are you a content creator or a blog author who generates unique, high-quality content for a living? Have you noticed that generative AI platforms like OpenAI or CCBot use your content to train their...
View ArticleHow to fix “Error: Can’t open display: (null)” with ssh and xclip command in...
When you try to use the xclip command over the ssh-based session to copy and paste data, you will get the following message on screen:Error: Can't open display: (null) Here is how to fix this error by...
View ArticleHow to install Perl in Fedora LinuxnixCraft
I am migrating an old Perl project from an unsupported OS to Fedora Linux 38. However, I discovered that Perl is not installed by default, while Python 3 is. This seems ridiculous. Anyway, here is how...
View ArticleHow to list package files with dnf in Linux (RHEL, CentOS, Rocky, Fedora, and...
If you’re using RHEL, CentOS, Rocky, Fedora, or Alma Linux, you may encounter situations where you must list files in a package before installing it. Similarly, there might be instances where you need...
View ArticleHow to merge all PDF files into one PDF in LinuxnixCraft
I recently had to submit multiple PDF files for government work, but the web form only allowed for the uploading of a single file. This meant that I had to merge the PDF files into one on Linux. To do...
View ArticleHow to open DHCP port using UFW in LinuxnixCraft
The Uncomplicated Firewall (UFW) needs to be configured to allow traffic on UDP ports 67 and 68, regardless of whether the Dynamic Host Configuration Protocol (DHCP) server is local or remote....
View ArticleSSH WARNING: UNPROTECTED PRIVATE KEY FILE! Error and SolutionnixCraft Updated...
{Updated} Are you getting, ' WARNING: UNPROTECTED PRIVATE KEY FILE!' when try to use the ssh command under Linux, macOS or BSD? Let us see how I fixed this problem and log in using the ssh command.The...
View ArticleHow to enable contrib repo on Debian Linux 10/11/12nixCraft
Sometimes, when you try to install specific Debian Linux packages, you might encounter an error message that reads:Unable to locate package pkg-name-here In many cases, the required package might...
View ArticleHow to install GPG (gnupg2) on a Debian Linux to fix gpg command not found...
GnuPG2 (or GPG2) is an open-source and free tool that implements the OpenPGP standard. Its primary purpose is to encrypt your sensitive information to protect it from unauthorized access. It also...
View ArticleHow to install BTRFS on a Debian Linux 12/11nixCraft
Btrfs, which stands for "Butter FS" or "B-tree FS," is a modern Linux file system. It was developed to overcome the limitations of older file systems like ext4 or ext3. Btrfs is an excellent choice for...
View ArticleHow to verify Debian CD or DVD image using GPGnixCraft
When you download Debian Linux CD or DVD images, you must verify the authenticity of Debian Linux CD or DVD images using the gpg and sha512sum command. There are three files you will find here for...
View Article