How to Disable and Enable Laptop Keyboard for X.org Server in Linux

Posted on

Attaching a USB keyboard to a laptop is common when using a laptop because a normal keyboard may provide a more convenient typing experience. The laptop keyboard is not used in these situations. However, the laptop keyboard may still be touched by accident. In this post, we will discuss how to disable and enable the
Read more

How to Set the Static IP Address Using CLI in Fedora/CentOS Linux

Posted on

How to set the static IP address for CentOS 7/Fedora 22+ is introduced in this post. Here, we assume the Linux is using NetworkManager to manage the network. All steps are done as root. Find the interface you want to set the address Command ifconfig -a lists all interfaces. Find the interface name to set,
Read more

Three Methods of Executing Commands on Many Nodes in Parallel via SSH on Linux

Posted on

It is common to execute commands on many nodes/hosts via SSH for managing a cluster of Linux servers. On Linux, there are many choices for this task. Generally, to run commands on many nodes, there are two modes: serial mode and parallel mode. In serial mode, the command is executed on the node one by
Read more

How to Add Google to Firefox in Linux Mint as Default Search Engine

Posted on

In Firefox on Linux Mint, Google is not in the default list of search engines. Linux Mint has its criteria for adding search engines while Google seems not in those suggested by Linux Mint because “Amongst commercial search engines, only the ones which share with Linux Mint the revenue Linux Mint users generate for them
Read more

Notes for Beginners of Software Development on Linux

Posted on

Linux is a great platform for software development targeting servers or backends. In general, working on Linux is very productive. The problem that beginners on Linux face is the the learning curve is steep at the beginning. But believe me, after you get through the initial green steep learning step as in the figure below
Read more

How to Configure the Latest Version of Flash on Firefox for Linux: by the Fresh Player Plugin

Posted on

As you may know, Adobe stopped supporting the NPAPI version of Flash on Linux and the latest NPAPI version of Flash player at version 11.2 released back in 2012 will only receive security fixes. Even the security fixes to the 11.2 version of the Flash Plugin your Firefox is using will end on May 4,
Read more

Keeping Linux SSH Session Alive from Disconnecting – Server and Client Side Fixes

Posted on

SSH is a very common tool for Linux/Unix platforms. One annoying problem when using SSH is that the connection may get disconnected if the SSH connection is idle for some time under common configurations. Users may run an infinite loop like while true; do uptime; sleep 30; done when there is no work to be
Read more

Which Checksum Tool on Linux is Faster?

Posted on

It is common practice to calculate the checksums for files to check its integrity. For large files, the checksum computation is slow. Now I am wondering why it is so slow and whether choosing another tool will be better. In this post, I try three common tools md5sum, sha1sum and crc32 to compute checksums on
Read more

How to Run a Command Upon Files or Directories Changes on Linux

Posted on

Doing actions upon changes of files and directories is very useful. Examples like compiling a project after the source code files are changed, sending emails after important configuration files are modified, building the PDF after a TeX file is modified. On Linux, the inotify-tools provide good support for trigger actions after changes. In this post,
Read more

How to Configure Scanner in an HP All-In-One Printer on Linux?

Posted on

The hplip packages contains all the tools you need to set up the HP scanner. For scanning, you may use the sane and xsane tools. The tricky part to enable the scanner is carefully choose which driver to use from the hplip package. If you choose a non-suitable driver, only the printer will work and
Read more

How to Clean RAID Signatures on Linux

Posted on

RAID systems such as MegaRAID add signatures to disks to maintain the infomration on these didks. When we simply remove these disks and install them to another server, Linux on the new server may detect these RAID signature infomration and refuses to continue write to the disk. Here is one example that mkfs reports “apparently
Read more

How to Regenerate Grub2 Config Files on Linux

Posted on

Grub2 config file may need to be re-generated after changing Grub2 configurations such as configuration changes and setting default boot entries. The Grub2’s config file may be at different locations depending on your Linux distro and whether your Linux is booted in BIOS or UEFI mode. This makes regenerating Grub2 config file not easy for
Read more

How to Get Rid of DTS/AC3 Audio using ffmpeg on Linux to Play MKV Files on iOS or Android

Posted on

I encountered the problem on iPhone that MKV video files with AC3 are played with no sound. The OPlayer reports to me that “According to DTS patent, DTS is forbidden to play , None of the media player on iPhone/iPad can play DTS”. However, the video file can be played in MPlayer on Linux just
Read more

How to Get Available Filesystem Space on Linux: a C Function with a C++ Example

Posted on

It is common for programs to write to files in filesystems on disks. However, what if the disk was almost full when your program writes to the filesystem on a disk? For systems software and mission critical programs, it is a better or must-to-do practice to check the available filesystem space before actually writing to
Read more

Profiling Vim to Find Out Which Plugin Makes Vim Slow

Posted on

Vim is pretty fast and powerful. However, the core of Vim is (yet) single-threaded (some discussions and tries on porting Vim to be multi-threading, but not yet there). This means some functions that are slow will block Vim there and you have to wait for it. While Vim is fast, some plugins are not. When
Read more

Controlling Filesystem Mounting on Linux using /etc/fstab

Posted on

Controlling the mounting of filesystems is a useful technique for managing Linux systems. The mounting configurations are mostly in the /etc/fstab file. In this post, we will discuss 2 common and useful techniques for controlling the filesystem mounting by playing with the /etc/fstab file: allowing non-root users to mount/unmount filesystems and avoiding mounting failures blocking
Read more

What Is the Name of the Linux-based OS: A Survey

Posted on

You may already well know “Linux” and may also use the “operating system based on the Linux kernel” directly or indirectly (you are indirectly using it now as this site is hosted on Linux). But how should we name the OS based on Linux? You may know there is GNU/Linux naming controversy. Different people have
Read more

Lazy Linux Admins Going to Server Rooms Less: Forced Reboot, Auto Reboot after Kernel Panic and Email Notification after Reboot

Posted on

Having to go the the server room to reset servers is the most headache thing for admins managing a cluster of Linux servers in a remote site. Either you can ping the server but can not ssh to it, or you even can not ping it. There are various reasons that may cause a Linux
Read more

Shrinking an Ext4 File System on LVM in Linux

Posted on

In Extending a Mounted Ext4 File System on LVM in Linux, we introduced how to extend a mounted ext4 filesystem on LVM Logical volume by adding a new physical volume. It is also common to shrink an ext4 file system as to spare some disk space. In this post, I will discuss how to shrink
Read more