I turn my Linux computer off and when I turn it on it runs disk check (fsck) on hard disk. Why?

Posted on in Categories Gnome, Howto, Kde, Linux, Linux desktop, Ubuntu Linux last updated September 13, 2007

A typical question asked by many new Linux users. The answer is pretty simple:

Your partitions are not being unmounted properly when you last shutdown the Linux desktop. Linux needs to shutdown properly (I’m sure this applies to Windows and Mac OS too) before powered off. If you skip this step there could be data loss.

If you are using text based session (CLI), type following command as privileged user:
shutdown -h now

If you are using GUI (KDE / Gnome or any other Windows Manager) click on System > Quit button. Look out for shutdown button.

Do not unplug the power supply. Also use UPS (Uninterruptible power supply) to protect data and to avoid other problems. I recommend APC ups for continuous supply of electric power.

Updated for accuracy.

nixCraft FAQ Roundup May 29, 2007

Posted on in Categories FAQ last updated October 30, 2008

Recently updated/posted Linux and UNIX FAQ (mostly useful to Linux/UNIX new administrators or users) :


Linux Disable the Ctrl-Alt-Delete shutdown keys

Posted on in Categories CentOS, Debian Linux, Gentoo Linux, Howto, Linux, RedHat/Fedora Linux, Suse Linux, Sys admin, Tips, Troubleshooting, Ubuntu Linux last updated September 13, 2007

On a production system it is recommended that you disable the [Ctrl]-[Alt]-[Delete] shutdown. It is configured using /etc/inittab (used by sysv-compatible init process) file. The inittab file describes which processes are started at bootup and during normal operation. You need to open this file and remove (or comment it) ctrlaltdel entry.

Ctrlaltdel specifies the process that will be executed when init receives the SIGINT signal. SIGINT is the symbolic name for the signal thrown by computer programs when a user wishes to interrupt the process, for example reboot/shutdown system using [Ctrl]-[Alt]-[Del].). This means that someone on the system console has pressed the CTRL-ALT-DEL key combination. Typically one wants to execute some sort of shutdown either to get into single-user level or to reboot the machine.

Disable CTRL+ALT+Del keys

Open /etc/inittab file, enter:
# vi /etc/inittab

Search for line that read as follows:
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

And remove the line or comment out the above line by putting a hash mark (#) in front of it:
# ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

Save the file and exit to shell promot. Reboot system to take effect or type command:
# init q

See also:

Schedule Windows server to reboot or shutdown automatically

Posted on in Categories Sys admin, Tips, Troubleshooting, Windows, Windows server last updated September 13, 2007

Sometime it is necessary to reboot (or shutdown) windows server. Under UNIX or Linux you can use reboot / hal t/shutdown command via cron jobs or at command. But, when it comes to Windows server there is no built in command exist. Only Windows 2000 Resource Kit offers shutdown command line utility.

However, sysinternals has nifty utility called PsShutdown. It is a command-line utility similar to the shutdown utility from the Windows 2000 Resource Kit, but with the ability to do much more. In addition to supporting the same options for shutting down or rebooting the local or a remote computer, PsShutdown can logoff the console user or lock the console (locking requires Windows 2000 or higher). PsShutdown requires no manual installation of client software.

How do I schedule Windows Server Reboot / Shutdown?

You can download PsShutdown from sysinternals web site.

Store file on Windows server in folder. I use folder called C:\admutils. Next open windows command prompt (Start > Run > cmd) and use windows at command to schedule reboot:
c:> at 2:00am c:\admutils\psshutdown.exe -r -f -c -t 10
Above command will reboot system at 2am. If you want to shutdown system:
c:> at 1:00am c:\admutils\psshutdown.exe -s -f -c -t 10

  • -s: Shutdown windows server
  • -r: Reboot windows server
  • -f: Forces all running application to exit
  • -c: Allow the shutdown to by cancel by user
  • -t: Specifies the countdown in seconds until the shutdown

For more information read official psshutdown documentation. Read at command help by typing at /? command.

How to: Allow Any User To Shutdown a Linux Server

Posted on in Categories CentOS, Debian Linux, FreeBSD, Gentoo Linux, Howto, Linux, RedHat/Fedora Linux, Sys admin, Tips, Ubuntu Linux last updated December 28, 2009

You need to use the sudo command to grant a permission to other users to shutdown your server. The sudo command allows a permitted user to execute a command as the superuser or another user, as specified in the /etc/sudoers file. Login as a root user and type the visudo command to edit the sudoers file.

HP-UX: How Do I configure routing or add route?

Posted on in Categories Howto, HP-UX, Sys admin, Tips, UNIX last updated October 24, 2007

You can use route command to configure routing. Syntax is as follows:
route add net {network-address} netmask {subnet} {router-address}

Let us assume your router address is and network ID is, then you can type route command as follows:
# route add net netmask


To add a default route:
# route add default

Verify that (display) routing table is updated (display routing table):
# netstat -nr

Test it i.e. try to ping or send nslookup request:
# ping mycorp.com

To flush all routing entries use command [quite handy to clean your gordian knot ;)] :
# route -f

However if I reboot HPUX box then above routing entries gets removed. To pick up your setting upon each reboot your need to configure Routes in HPUX networking configuration file – /etc/rc.config.d/netconf. To add default router/gateway
# vi /etc/rc.config.d/netconf

Add or modify following entries


Reboot HP-UX system/server to take effect
# shutdown -ry 0