Friday, 30 November 2012

How to edit a remote file over ssh

When you need to edit a file hosted on a remote host, it will be nice if you can edit the remote file over ssh with vi command, as if it were a local file. Of course you could set up NFS over ssh tunnel to achieve that, but that will be an overkill if this is just one-time usage. So how can I edit a remotely located file over ssh?Read more »

Thursday, 29 November 2012

How to checkout a specific version of git repository

A public git repository is often shared by multiple developers who constantly contribute new code and fixes, and users who check out code to try it. Along with code itself, a git repository contains full commit history of the code, as well as revision tracking information. As such, you can easily checkout a particular version of specific files from git repository if you want. In order to checkout a specific version of git repository, see the following examples.Read more »

Wednesday, 28 November 2012

How to view a list of MySQL users and their privileges

If you are running a multi-user MySQL database, handy commands that show a list of all existing MySQL users and their privileges may be on your cheat sheet. To find out all MySQL users and the permissions granted to each user, log in to your MySQL server, and run the following MySQL commands.Read more »

Tuesday, 27 November 2012

How to convert pdf files to jpg format on Linux

While PDF (short for "Portable Document Format") is a widely used document format supported by a variety of applications on multiple platforms, you may want to convert pdf files to jpg format for several reasons. For example, you may want to embed a pdf file into PowerPoint or OpenOffice Impress presentations, in which case jpg/jpeg images will be easier to work with. Converting a pdf file into jpg also makes it unnecessary to load a separate plugin or external application for web browsers to render it. If you are looking to convert pdf files to jpg/jpeg format on Linux, the following guide will help.Read more »

Monday, 26 November 2012

How to enable X11 forwarding using ssh

X11 forwarding is a mechanism that allows graphical interfaces of X11 programs running on a remote Linux server to be displayed on a local client machine. Behind the scene, the X11 output of a remotely running program is authorized to be sent to localhost via an X11 connection between client and a remote server. SSH has an option to securely tunnel such X11 connections, so that X11 forwarding sessions are encrypted and encapsulated. If you would like to set up X11 forwarding over SSH, check out this guideline.Read more »

Friday, 23 November 2012

How to convert jpg image file to pdf format on Linux

Jpg is without any doubt the most popular format used to share images on the Internet. However, there are several advantages in using pdf images compared to jpg images. For one, while jpg is a raster format with lossy compression, pdf is a layout format that contains both vector and raster graphics. Read more »

Thursday, 22 November 2012

How to start VMware server remote console without web interface

In VMware Server, console access for virtual machines (VMs) is obtained by using VM remote console plug-in of web browsers. However, as VMware Server is no longer supported by VMware, its remote console plug-in has not been usable in the latest web browsers. For example, VM remote console plug-in is broken for Firefox version 3.6 and higher. When you attempt to launch VM console window on the latest Firefox via console plugin, you will get an error saying "Cannot access virtual machine console. The request timed out."Read more »

Wednesday, 21 November 2012

How to install an old version of Firefox on Linux

There could be several reasons why you want to stick with a specific (old) version of Firefox web browser, instead of updating it to the latest version. Some of your favorite add-ons could no longer work after Firefox update; you may want to try out an old Firefox extension which has not been updated for too long a time to be compatible with the latest Firefox; some web application's user interface may no longer be accessible after you have upgraded your Firefox, etc.Read more »

Tuesday, 20 November 2012

How to compress png files on Linux

PNG (short for "Portable Network Graphics") is a raster image format designed to replace limitations of GIF image format in terms of data compression and color precision. The size of a PNG image file can vary significantly based on several factors including color depth, interlacing, precompression filter, compressor used, etc. If you would like to compress a PNG image file losslessly on Linux, read on.Read more »

Monday, 19 November 2012

What are popular packet sniffers on Linux?

A packet sniffer captures live packets from networks, decodes them according to protocol specifications, and optionally takes actions according to the parsed packet contents (e.g., in case of security detection systems). It is a very useful tool to diagnose networks or protect against security attacks over networks. The following are several popular open-source packet sniffers available on Linux.Read more »

Friday, 16 November 2012

How to install httptunnel on Linux

Httptunnel is a GNU/GPL-licensed free software that allows one to create a bi-directional tunnel encapsulated by HTTP, between client and server. HTTP-encapsulated tunnels are useful when you want to use games, IM clients, or P2P sharing applications across restrictive firewalls or proxies which tend to block pretty much everything except well known traffic such as HTTP traffic. Httptunnel consists of hts (server) and htc (client) components to establish HTTP tunnels in between.Read more »

Thursday, 15 November 2012

What are available iptables management tools with GUI?

Netfilter is a packet filtering system within the Linux kernel used for intercepting and processing network packets. Iptables is a user-space program that relies on netfilter to implement stateless/stateful packet filtering for network firewalls, and address/port translation for NATs. There are many applications and tools that ease complex iptables management tasks with convenient graphical front-ends. Here are some of those iptables management tools with GUI.Read more »

Wednesday, 14 November 2012

How to upload photos to Flickr on Linux

If you are a Linuxer who is also a passionate photographer, you will probably have a Flickr account, and want to know about how to manage your photos in your Flickr account on your Linux computer. While any web browser can be used to access your Flicker account on the web, it probably cannot beat a dedicated Flickr client software with streamlined user interface and pre-configured authentication. Here I will focus on how to upload photos to Flickr using dedicated Flickr client for Linux.Read more »

Tuesday, 13 November 2012

How to force login password prompt in single user mode

Linux provides so-called "single user mode" or "rescue mode" in which a multi-user Linux system boots into a single user with superuser privilege. The single user mode is useful when you need exclusive access to shared system resources, e.g., when conducting maintenance or security audit of root file system, and updating critical system settings such as resetting root passwords.Read more »

Monday, 12 November 2012

How to ping a specific port of a remote host

Ping is a networking utility used to test the reachability and round-trip time (RTT) delay of a remote host over Internet Protocol (IP). Ping utility does so by sending out a series of Internet Control Message Protocol (ICMP) echo request packets to a remote host, and waiting for corresponding ICMP response packets from the host. However, you cannot ping a specific port because ICMP belongs to layer-2 IP layer, not layer-3 transport layer (e.g., TCP/UDP). In order to ping a specific port of a remote host, you need to use layer-3 transport protocols which have a notion of port numbers.Read more »

Friday, 9 November 2012

How to run fdisk in non-interactive batch mode

Fdisk is a command-line utility for disk partition management on computer operating systems including Linux. It's not common that you want to automate fdisk (i.e., running fdisk in a batch mode), since (re)-partitioning your system is a rare thing, and you are typically dealing with a very small number of partitions at once. However, if you are trying to automate virtual machine (VM) provisioning, partitioning and formatting (VM's hard drives) in batch mode may no longer be so unrealistic.Read more »

Thursday, 8 November 2012

How to install software packages in non-interactive batch mode on Debian/Ubuntu

If you are a system admin, you may have wondered how to install a list of software packages in one shot. Manually installing software programs on multiple Linux systems would be a tedious job, and your time can be better spent elsewhere. If you seek to install software packages in non-interactive batch mode, you can check out this guideline. This is for Debian/Ubuntu systems.Read more »

Wednesday, 7 November 2012

How to install VMware Player on Ubuntu Desktop

VMware Player is a closed-source multi-platform virtualization software that is freely distributed by VMware. VMware Player has a convenient graphical user interface for virtual machine (VM) management, and with built-in NAT/bridged networking, there is no hassle in configuring VM networking, unlike other hypervisors such as KVM and Xen. Installing VMware Player on Ubuntu Desktop is straightforward, except that there are some caveats to take care of, which will be described in the following.Read more »

Tuesday, 6 November 2012

How to install tcpreplay on Linux

Tcpreplay is a suite of command-line utilities that are used to "replay" previously captured packet dumps in a real network. In order to use tcpreplay, you first need to capture live network traffic using packet capture tools such as tcpdump, rewrite TCP/IP packet headers of the captured packets appropriately (usually MAC and IP addresses), and then re-inject the packets on to any arbitrary network under consideration.Read more »

Monday, 5 November 2012

How to build a custom kernel module or device driver for XenServer

Citrix allows one to build any custom kernel module or hardware driver for XenServer, by offering Driver Development Kit (DDK). A DDK is essentially a virtual machine with all the kernel headers and development tools needed to extend the XenServer kernel. The following guide is on how to use DDK to compile a custom kernel module or hardware driver for XenServer.Read more »

Friday, 2 November 2012

How to find recently modified files on Linux

There are various occasions where you would like to search for files that have been changed/created in your Linux system recently or within any time frame. For example, as a system admin, you have done some configuration on your Linux system, but forgot where it was saved. You want to verify whether/how your Linux file system has been tampered with by someone recently. If you would like to find recently updated files on Linux, you can use find command as follows.Read more »

Thursday, 1 November 2012

How to enable Korean language input keyboard on Ubuntu

If you would like to use foreign language input on Ubuntu, there are two ways to enable foreign language input. One method is using Smart Common Input Method platform (SCIM), and the other one is to use Intelligent Input Bus (iBus).Read more »