≡ Menu

linux distributions

Disable and Uninstall APF Firewall Script

Q. How do I uninstall and disable APF Firewall script under CentOS / Red Hat Enterprise Linux without breaking anything else?
[click to continue…]

UNIX / Linux Find File Owner Name

Q. How do I find out the name of file / directory owner under UNIX / Linux operating systems?
[click to continue…]

Linux / UNIX: List Open Files for Process

Q. How do I list all open files for a Linux or UNIX process using command line options?
[click to continue…]

Open Source Photoshop Software

Q. Is there is a open source Photoshop software for Linux operating system?
[click to continue…]

Linux Downloads For Server / Desktop / Laptop Users

I would like to switch to Linux. I want to try free and functional operating system. How do I download Linux ISO images to install on my Desktop / Laptop / Server? Where can I download Linux operating system for my desktop usage?
[click to continue…]

Q. I’m using Redhat enterprise Linux desktop / workstation operating system with HP laptop. Several Linux distributions have a / script to enable to disable Laptop mode but Redhat misses the script. How do I enable or disable laptop mode on fly?

A. Modern Linux kernel includes very good support for Laptop mode. It is use to control the IO subsystem. When laptop mode is enabled, the Linux will try to be smart about when to do disk I/O. It gives as much time as possible to be in a low power state. If mode is disabled if value is set to zero (0). To enable mode use non zero value such as 5.

Display or print current Laptop mode

Type the following command:
$ cat /proc/sys/vm/laptop_mode


Turn on or enable Laptop mode

Type the following command as the root user:
$ sudo echo 5 > /proc/sys/vm/laptop_mode
# echo 5 > /proc/sys/vm/laptop_mode

A note about Ubuntu Linux

According to this page:

Ubuntu has a laptop-mode-tools package, which is installed by default on laptops. However, laptop mode is disabled by default in Ubuntu Edgy (6.10), because some people have been experiencing hangups with it on certain laptops (mostly Thinkpads). Until now, nobody has any clue what is happening here. To reenable laptop mode, edit /etc/default/acpi-support and set ENABLE_LAPTOP_MODE=true.

If you want to use the latest version of laptop mode tools, you can use the Debian packages, they are compatible enough to work out-of-the-box on Ubuntu.

A note about Suse Linux

=> Suse Linux comes with powersaved tool, so please ignore above commands for power saving.

Updated for accuracy.

Q. I’m using CentOS 5 Linux 64 bit version. How do I share directory called /data2 to all other UNIX / Linux computers?

A. NFS (Network file system) is both a protocol and file system for accessing and sharing file systems across a computer network using UNIX and Linux. NFS v4 is used in modern Linux distributions. It offers performance improvements, mandates strong security, and introduces a stateful protocol etc.

How do I export a directory with NFS?

In order to export or share directory called /data2, you need to edit a file called /etc/exports. The file /etc/exports serves as the access control list for file systems which may be exported to NFS clients.:
# vi /etc/exports
Add config directive as follows:
/data2 *(rw,sync)

Each line contains an export point and a whitespace-separated list of clients allowed to mount the file system at that point. Each listed client may be immediately followed by a parenthesized, comma-separated list of export options for that client.


  • rw - Allow both read and write requests on /data2 NFS volume
  • sync - Reply to requests only after the changes have been committed to stable storage

Save and close the file. Restart the nfs service:
# /etc/init.d/nfs restart

NFS client configuration

Client computer need to mount file system using mount command or /etc/fstab file, enter:
# mkdir /mnt/nfs
# mount -t nfs4 nfsserver-name-or-ip:/data2 /mnt/nfs

Read the man page for more configuration options:
$ man exports