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

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

Tutorial Video for “PHP Function for Fetching RSS Feed and Outputting Feed Items as HTML”

Posted on

After the post Fetching RSS Feed and Outputing Feed Items as HTML in PHP was originally published, there are some updates such as adding a simple RSS feed caching mechanism and supporting scanning content parts of the feed items for images. Recently, Webucator makes a great tutorial video on introducing the RSS to HTML PHP
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

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 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

Blocking JavaScripts from a Site in Chrome in 2 Easy Steps

Posted on

You may be aware of the GitHub’s largest DDoS attack in history on Mar. 27, 2015 (some context, technical details, and discussions): We've been under continuous DDoS attack for 24+ hours. The attack is evolving, and we're all hands on deck mitigating. — GitHub Status (@githubstatus) March 27, 2015 One important technique when facing this
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

Fetching RSS Feed and Outputing Feed Items as HTML in PHP

Posted on

It is useful to show the feed items directly on the webpage as HTML content. In this ost, we will show one single PHP function that fetches an RSS feed and outputs the feed items as HTML elements in the web page. One example to fetch an RSS feed and output the itmes as HTML
Read more

Free VPNs for iPhone Users: OpenVPN + Ovpn Spider

Posted on

VPNs are useful for testing viewing webpages from a remote location or visiting blocked websites. In this post, I will introduce a method for finding and using free VPNs on iPhone. Note that the VPNs are free and the providers are not identified. Hence, only use this method for visiting public webpages or keeping visiting
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

How to Turn GNOME terminal to a Pop-up Terminal

Posted on

A pop-up terminal is great and handy on Linux and similar OS. On KDE, Yakuake is great. On Gnome or GTK, I ever tried Guake. It is quite good. However, it has not been as mature, stable and figure-rich as gnome-terminal. One day, I got this idea: why not using a script/program to manage the
Read more

How to Configure Linux Kernel Video Mode for 32-bit and 16-bit Boot Protocols

Posted on

The Linux kernel has a generic driver for a graphic framebuffer named vesafb on intel boxes. It provides a nice large console for most of modern displays. Setting VESA modes for Linux kernel with 32-bit and 16-bit boot protocol are different. We introduce both methods here. Linux kernel with 32-bit boot protocol For machine with
Read more