How to find network card driver name and version on Linux

Question: An Ethernet network interface card is attached to my Linux box, and I would like to know which network adapter driver is installed for the NIC hardware. Is there a way to find out the name and version of a network card driver for my network card? For network interface card (NIC) hardware to […]
Continue reading…

 

How to export Robinhood transaction data

Question: I have been using Robinhood stock trading platform, and I would like to export all the transaction records from my Robinhood account to a spreadsheet file for accounting purposes. Is there an easy way to export and save Robinhood transaction data in a CSV file, preferably from the Linux command line? As a stock […]
Continue reading…

 

How to access shell environment variables in Perl script

Question: I would like to access several environment variables in my Perl script. How can I access shell variables from a Perl program? In some cases you may want to access shell environment variables (e.g., $PATH, $PWD, $HOME, $LANG) in your Perl script. While you can pass any needed environment variables to your Perl script […]
Continue reading…

 

How to check if AES-NI is enabled for OpenSSL on Linux

Question: I have a Linux server which has Intel AES-NI hardware capability. I would like to check whether currently installed OpenSSL can use AES-NI acceleration. Intel Advanced Encryption Standard New Instructions (AES-NI) is a special instruction set for x86 processors, which is designed to accelerate the execution of AES algorithms. AES-based symmetric encryption is widely […]
Continue reading…

 

How to extract files from an RPM package on Linux

Question: I downloaded an RPM file (foo.rpm) from somewhere, and I would like to manually extract files from the RPM package. Is there an easy way to extract files from an RPM package without installing it? An RPM package contains a set of files, typically compiled software binaries, libraries, and their development source files. These […]
Continue reading…

 

How to fix “configure: error: pcre.h not found”

Question:When I try to compile a program, it fails with the following error. How can I fix this error on [insert your Linux distro]? configure: error: pcre.h not found … pcre.h is a development header file for PCRE (Perl Compatible Regular Expressions), which is a C library for pattern-matching regular expressions whose syntax and semantics […]
Continue reading…

 

How to remove all network namespaces at once on Linux

Question: I have created a number of network namespaces, and now I want to remove them all. Is there a way to delete all existing network namespaces at once from the command line on Linux? In Linux, the concept of “namespaces” was introduced as a way to isolate system resources among different groups of processes. […]
Continue reading…

 

How to plot a bar graph on Gnuplot

Question: How can I create a bar graph (bar chart) using Gnuplot? A bar graph is a plot which visualizes data values using proportional-size bars. Bar charts are useful when you want to compare multiple items among different categories. As you can imagine, they are much more effective than a table of numerical data. This […]
Continue reading…

 

How to disable MAC learning in a Linux bridge

Question: I am troubleshooting Ethernet bridging which I set up with a Linux bridge, and I would like to disable MAC learning on the Linux bridge. How can I do that? An Ethernet bridge is a network component which interconnects multiple Ethernet networks by forwarding packets from one network to another. Linux has a software […]
Continue reading…

 

How to enable .htaccess in Apache HTTP server

Question: I wanted to use .htaccess file to configure something for my website running on Apache web server. But the .htaccess file I placed in the website’s document root directory is not working. How can I enable .htaccess in Apache web server? An .htaccess file is a directory-level configuration file for Apache HTTP server, which […]
Continue reading…

 

How to add bookmarks to a PDF document on Linux

Question: I would like to add bookmarks to a PDF file, so that the bookmarks appear in the left hand side bookmarks panel. Is there a command-line approach to create bookmarks and embed bookmark links in a PDF file on Linux? In a PDF document, bookmarks can be added as a navigational tool to allow […]
Continue reading…

 

How to record a particular area of desktop screen on Linux

Question: I want to create a screencast of a particular area on my Linux desktop (not the entire desktop). Is there screen recorder software that allows me to do that? When you need to demonstrate your desktop activities to someone else, using a screencast (i.e., recording of desktop screen) is far more effective than a […]
Continue reading…

 

How to add proxy exceptions on Ubuntu desktop

Question: My Ubuntu desktop computer is connected behind a corporate proxy. I configured necessary proxy setting on Ubuntu desktop, so all my HTTP/HTTPS traffic goes through the corporate proxy. However, I need to be able to selectively bypass the proxy for some websites (e.g., websites with corporate IP addresses or private IP addresses). On “network […]
Continue reading…

 

How to set up NFS server and client on CentOS 7

Question: I would like to share a directory via NFS between CentOS 7 hosts. What is the procedure for configuring NFS server and client, and enabling NFS mounts between them in CentOS 7 environment? NFS is a distributed file system protocol built on top of Sun’s RPC (remote procedure call). NFS is popularly used to […]
Continue reading…

 

How to detect the type of virtualization from the command line

Question: I am trying to write a shell script in which I need to detect whether the Linux server on which the script is running is a virtual machine, a container or actual bare-metal hardware. This is because the script should perform different tasks depending on whether the underlying server is virtual or physical. Is […]
Continue reading…

 

How to install Newsbeuter command-line RSS reader on Linux

Question: I want to try Newsbeuter RSS reader. How can I install Newsbeuter on [Debian, Ubuntu, CentOS, Fedora or RHEL]? Newsbeuter is a command-line RSS feed reader designed to access RSS/Atom feeds in a terminal environment. Used together with a text-mode web browser such as elinks, lynx or w3m, Newsbeuter allows you to read RSS/Atom […]
Continue reading…

 

How to fix “fatal error: ncursesw/ncurses.h: No such file or directory”

Question: When I try to compile a program, it fails with the following error. fatal error: ncursesw/ncurses.h: No such file or directory #include <ncursesw/ncurses.h> How can I fix this error on [insert your Linux distro]? ncursesw/ncurses.h is a development header file for ncursesw, which is source-compatible with ncurses library, but supports wide characters or Unicode […]
Continue reading…

 

How to compare two version numbers in a shell script

Question: I am writing a shell script in which I need to compare two version number strings (e.g., “1.2.30” and “1.3.0”) to determine which version is higher or lower than the other. Is there a way to compare two version number strings in a shell script? When you are writing a shell script, there are […]
Continue reading…

 

How to check the changelog of a package on Linux

Question: When I install or upgrade a package on Linux, I want to find out what changes (e.g., new features or bug fixes) have been made in the package before or after installing it. How can I view the changelog of a (Deb/RPM) package on [Debian, Ubuntu, CentOS, Fedora]? When a program or a library […]
Continue reading…