Monday, 23 February 2015

How To : Install/Upgrade to Linux Kernel 4.0-RC1 in Ubuntu/Linux Mint Systems

    The Linux Kernel 4.0-RC1 is now available for the users, announced Linus Torvalds. This Linux Kernel version comes with plenty of fixes and improvements. This article will guide you to install or upgrade to Linux Kernel 4.0-RC1 in your Ubuntu or Linux Mint system.


Installation

For 32-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-rc1-vivid/linux-headers-4.0.0-040000rc1_4.0.0-040000rc1.201502222235_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-rc1-vivid/linux-headers-4.0.0-040000rc1-generic_4.0.0-040000rc1.201502222235_i386.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-rc1-vivid/linux-image-4.0.0-040000rc1-generic_4.0.0-040000rc1.201502222235_i386.deb
Install them.

$ sudo dpkg -i linux-headers-4.0*.deb linux-image-4.0*.deb
Reboot the system.

sudo reboot

For 64-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-rc1-vivid/linux-headers-4.0.0-040000rc1_4.0.0-040000rc1.201502222235_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-rc1-vivid/linux-headers-4.0.0-040000rc1-generic_4.0.0-040000rc1.201502222235_amd64.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.0-rc1-vivid/linux-image-4.0.0-040000rc1-generic_4.0.0-040000rc1.201502222235_amd64.deb
Install them.

$ sudo dpkg -i linux-headers-4.0*.deb linux-image-4.0*.deb
Reboot the system.

sudo reboot

To uninstall,

sudo apt-get remove 'linux-headers-4.0*' 'linux-image-4.0*'

Tuesday, 17 February 2015

A Bash Script to Install/Upgrade to Linux Kernel 3.18.6 in Ubuntu/Linux Mint

The Linux Kernel 3.18.6 is now available for the users, announced Linus Torvalds. This Linux Kernel version comes with plenty of fixes and improvements. The following BASH script, when executed, despite of the system architecture (valid only for i386, i686 and x86_64 based systems), installs Linux kernel 3.18.6 in your Linux systems.

Note: Make sure that you execute this script as a ROOT user.

Usage:

./script_name.sh
Script:

#!/bin/sh

# Check if the user is ROOT
if [ $(id -u) -ne 0 ]
then
    echo "You are not ROOT! Please login as ROOT."
    exit
fi

# Latest Available Kernel version
LatestKernel="3.18.6-031806-generic"

# Required Packages
Headers_All="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.6-vivid/linux-headers-3.18.6-031806_3.18.6-031806.201502061036_all.deb"
Headers_i386="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.6-vivid/linux-headers-3.18.6-031806-generic_3.18.6-031806.201502061036_i386.deb"
Image_i386="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.6-vivid/linux-image-3.18.6-031806-generic_3.18.6-031806.201502061036_i386.deb"
Headers_amd64="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.6-vivid/linux-headers-3.18.6-031806-generic_3.18.6-031806.201502061036_amd64.deb"
Image_amd64="http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.6-vivid/linux-image-3.18.6-031806-generic_3.18.6-031806.201502061036_amd64.deb"

# Debian Packages
DEB="linux-headers-3.18.6*.deb linux-image-3.18.6*.deb"

# Currently Installed Kernel Version
CurrentKernel_release=$(uname -r) 

# System Architecture
SystemArch=$(uname -i)

# Check if System already has latest kernel installed
if [ "$CurrentKernel" = "$LatestKernel" ]
then
    echo "Wow! Your System is Already Updated to Latest Available Kernel Version!"
    echo "Program will now exit..."
    sleep 2s
    exit
fi

# If latest kernel is not available, then check the system architecture and download necessary packages

# For 32-bit Systems

if [ $SystemArch = "i386" ] || [ $SystemArch = "i686" ]
then

    echo "Kernel upgrade process for 32-bit systems will now start..."
    sleep 2s
    echo "Downloading required packages.."
    sleep 2s

    wget $Headers_All
    wget $Headers_i386
    wget $Image_i386

    echo "Download process completed. Packages are present in $(pwd) directory"
    sleep 2s

    echo "Installing the packages..."
    dpkg -i $DEB

# For 64-bit Systems
elif [ $SystemArch = "x86_64" ]
then
    echo "Kernel upgrade process for 64-bit systems will now start..." 
    sleep 2s

    wget $Headers_All
    wget $Headers_amd64
    wget $Image_amd64

    echo "Download process completed. Packages are present in $(pwd) directory"
    sleep 2s

    echo "Installing the packages..."
    dpkg -i $DEB

# If system architecture is not compatible
else
    echo "Packages for following system architecture not found :  $SystemArch"
    echo "Program will now exit..."
    sleep 2s
exit
fi

    echo "Your system has been successfully upgraded to latest kernel version $(LatestKernel)."
    echo "System will now reboot."
    sleep 5s
    shutdown -r now
NOTE: Above script worked perfectly on my i386 system. I need confirmation from i686 and x86_64 users, if it works fine for them. Please suggest any changes to be incorporated.

How To: Install Linux Kernel 3.18.7 in Ubuntu/Linux Mint Systems

    The Linux Kernel 3.18.7 is now available for the users, announced Linus Torvalds. This Linux Kernel version comes with plenty of fixes and improvements. This article will guide you to install or upgrade to Linux Kernel 3.18.7 in your Ubuntu or Linux Mint system.


Installation

For 32-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.7-vivid/linux-headers-3.18.7-031807_3.18.7-031807.201502110759_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.7-vivid/linux-headers-3.18.7-031807-generic_3.18.7-031807.201502110759_i386.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.7-vivid/linux-image-3.18.7-031807-generic_3.18.7-031807.201502110759_i386.deb
Install them.

$ sudo dpkg -i linux-headers-3.18.7*.deb linux-image-3.18.7*.deb
Reboot the system.

sudo reboot

For 64-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.7-vivid/linux-headers-3.18.7-031807_3.18.7-031807.201502110759_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.7-vivid/linux-headers-3.18.7-031807-generic_3.18.7-031807.201502110759_amd64.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.7-vivid/linux-image-3.18.7-031807-generic_3.18.7-031807.201502110759_amd64.deb
Install them.

$ sudo dpkg -i linux-headers-3.18.7*.deb linux-image-3.18.7*.deb
Reboot the system.

sudo reboot

To uninstall,

sudo apt-get remove 'linux-headers-3.18.7*' 'linux-image-3.18.7*'

Tuesday, 10 February 2015

Linux Kernel 3.19 Stable is Now Available! Install Linux Kernel 3.19 in Ubuntu/Linux Mint Systems

    The Linux Kernel 3.19-Stable is now available for the users, announced Linus Torvalds. This Linux Kernel version comes with plenty of fixes and improvements. This article will guide you to install or upgrade to Linux Kernel 3.19 in your Ubuntu or Linux Mint system.



Installation

For 32-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-vivid/linux-headers-3.19.0-031900_3.19.0-031900.201502091451_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-vivid/linux-headers-3.19.0-031900-generic_3.19.0-031900.201502091451_i386.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-vivid/linux-image-3.19.0-031900-generic_3.19.0-031900.201502091451_i386.deb
Install them.

$ sudo dpkg -i linux-headers-3.19.0*.deb linux-image-3.19.0*.deb
Reboot the system.

sudo reboot

For 64-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-vivid/linux-headers-3.19.0-031900_3.19.0-031900.201502091451_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-vivid/linux-headers-3.19.0-031900-generic_3.19.0-031900.201502091451_amd64.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-vivid/linux-image-3.19.0-031900-generic_3.19.0-031900.201502091451_amd64.deb
Install them.

$ sudo dpkg -i linux-headers-3.19.0*.deb linux-image-3.19.0*.deb
Reboot the system.

sudo reboot

To uninstall,

sudo apt-get remove 'linux-headers-3.19.0*' 'linux-image-3.19.0*'

Saturday, 7 February 2015

How To: Install Linux Kernel 3.18.6 in Ubuntu/Linux Mint Systems

    The Linux Kernel 3.18.6 is now available for the users, announced Linus Torvalds. This Linux Kernel version comes with plenty of fixes and improvements. This article will guide you to install or upgrade to Linux Kernel 3.18.6 in your Ubuntu or Linux Mint system.


Installation

For 32-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.6-vivid/linux-headers-3.18.6-031806_3.18.6-031806.201502061036_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.6-vivid/linux-headers-3.18.6-031806-generic_3.18.6-031806.201502061036_i386.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.6-vivid/linux-image-3.18.6-031806-generic_3.18.6-031806.201502061036_i386.deb
Install them.

$ sudo dpkg -i linux-headers-3.18.6*.deb linux-image-3.18.6*.deb
Reboot the system.

sudo reboot

For 64-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.6-vivid/linux-headers-3.18.6-031806_3.18.6-031806.201502061036_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.6-vivid/linux-headers-3.18.6-031806-generic_3.18.6-031806.201502061036_amd64.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.6-vivid/linux-image-3.18.6-031806-generic_3.18.6-031806.201502061036_amd64.deb
Install them.

$ sudo dpkg -i linux-headers-3.18.6*.deb linux-image-3.18.6*.deb
Reboot the system.

sudo reboot

To uninstall,

sudo apt-get remove 'linux-headers-3.18.6*' 'linux-image-3.18.6*'

Saturday, 31 January 2015

How To: Install Linux Kernel 3.18.5 in Ubuntu/Linux Mint Systems

    The Linux Kernel 3.18.5 is now available for the users, announced Linus Torvalds. This Linux Kernel version comes with plenty of fixes and improvements. This article will guide you to install or upgrade to Linux Kernel 3.18.5 in your Ubuntu or Linux Mint system.


Installation

For 32-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.5-vivid/linux-headers-3.18.5-031805_3.18.5-031805.201501292218_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.5-vivid/linux-headers-3.18.5-031805-generic_3.18.5-031805.201501292218_i386.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.5-vivid/linux-image-3.18.5-031805-generic_3.18.5-031805.201501292218_i386.deb
Install them.

$ sudo dpkg -i linux-headers-3.18.5*.deb linux-image-3.18.5*.deb
Reboot the system.

sudo reboot

For 64-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.5-vivid/linux-headers-3.18.5-031805_3.18.5-031805.201501292218_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.5-vivid/linux-headers-3.18.5-031805-generic_3.18.5-031805.201501292218_amd64.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.5-vivid/linux-image-3.18.5-031805-generic_3.18.5-031805.201501292218_amd64.deb
Install them.

$ sudo dpkg -i linux-headers-3.18.5*.deb linux-image-3.18.5*.deb
Reboot the system.

sudo reboot

To uninstall,

sudo apt-get remove 'linux-headers-3.18.5*' 'linux-image-3.18.5*'

How To: Install Linux Kernel 3.18.4 in Ubuntu/Linux Mint Systems

    The Linux Kernel 3.18.4 is now available for the users, announced Linus Torvalds. This Linux Kernel version comes with plenty of fixes and improvements. This article will guide you to install or upgrade to Linux Kernel 3.18.4 in your Ubuntu or Linux Mint system.


Installation

For 32-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.4-vivid/linux-headers-3.18.4-031804_3.18.4-031804.201501271243_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.4-vivid/linux-headers-3.18.4-031804-generic_3.18.4-031804.201501271243_i386.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.4-vivid/linux-image-3.18.4-031804-generic_3.18.4-031804.201501271243_i386.deb
Install them.

$ sudo dpkg -i linux-headers-3.18.4*.deb linux-image-3.18.4*.deb
Reboot the system.

sudo reboot

For 64-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.4-vivid/linux-headers-3.18.4-031804_3.18.4-031804.201501271243_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.4-vivid/linux-headers-3.18.4-031804-generic_3.18.4-031804.201501271243_amd64.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.4-vivid/linux-image-3.18.4-031804-generic_3.18.4-031804.201501271243_amd64.deb
Install them.

$ sudo dpkg -i linux-headers-3.18.4*.deb linux-image-3.18.4*.deb
Reboot the system.

sudo reboot

To uninstall,

sudo apt-get remove 'linux-headers-3.18.4*' 'linux-image-3.18.4*'

Thursday, 29 January 2015

How To : Install/Upgrade to Linux Kernel 3.19-RC6 in Ubuntu/Linux Mint Systems

    The Linux Kernel 3.19-RC6 is now available for the users, announced Linus Torvalds. This Linux Kernel version comes with plenty of fixes and improvements. This article will guide you to install or upgrade to Linux Kernel 3.19-RC6 in your Ubuntu or Linux Mint system.


Installation

For 32-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-rc6-vivid/linux-headers-3.19.0-031900rc6_3.19.0-031900rc6.201501261152_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-rc6-vivid/linux-headers-3.19.0-031900rc6-generic_3.19.0-031900rc6.201501261152_i386.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-rc6-vivid/linux-image-3.19.0-031900rc6-generic_3.19.0-031900rc6.201501261152_i386.deb
Install them.

$ sudo dpkg -i linux-headers-3.19*.deb linux-image-3.19*.deb
Reboot the system.

sudo reboot

For 64-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-rc6-vivid/linux-headers-3.19.0-031900rc6_3.19.0-031900rc6.201501261152_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-rc6-vivid/linux-headers-3.19.0-031900rc6-generic_3.19.0-031900rc6.201501261152_amd64.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-rc6-vivid/linux-image-3.19.0-031900rc6-generic_3.19.0-031900rc6.201501261152_amd64.deb
Install them.

$ sudo dpkg -i linux-headers-3.19*.deb linux-image-3.19*.deb
Reboot the system.

sudo reboot

To uninstall,

sudo apt-get remove 'linux-headers-3.19*' 'linux-image-3.19*'

How To : Install/Upgrade to Linux Kernel 3.19-RC5 in Ubuntu/Linux Mint Systems

    The Linux Kernel 3.19-RC5 is now available for the users, announced Linus Torvalds. This Linux Kernel version comes with plenty of fixes and improvements. This article will guide you to install or upgrade to Linux Kernel 3.19-RC5 in your Ubuntu or Linux Mint system.


Installation

For 32-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-rc5-vivid/linux-headers-3.19.0-031900rc5_3.19.0-031900rc5.201501180935_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-rc5-vivid/linux-headers-3.19.0-031900rc5-generic_3.19.0-031900rc5.201501180935_i386.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-rc5-vivid/linux-image-3.19.0-031900rc5-generic_3.19.0-031900rc5.201501180935_i386.deb
Install them.

$ sudo dpkg -i linux-headers-3.19*.deb linux-image-3.19*.deb
Reboot the system.

sudo reboot

For 64-Bit Systems

Download the .deb packages.

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-rc5-vivid/linux-headers-3.19.0-031900rc5_3.19.0-031900rc5.201501180935_all.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-rc5-vivid/linux-headers-3.19.0-031900rc5-generic_3.19.0-031900rc5.201501180935_amd64.deb

$ wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.19-rc5-vivid/linux-image-3.19.0-031900rc5-generic_3.19.0-031900rc5.201501180935_amd64.deb
Install them.

$ sudo dpkg -i linux-headers-3.19*.deb linux-image-3.19*.deb
Reboot the system.

sudo reboot

To uninstall,

sudo apt-get remove 'linux-headers-3.19*' 'linux-image-3.19*'

Sunday, 25 January 2015

Tutorial on "chkconfig" Command in Linux with Examples

    Whenever a new service (like Samba or NFS) is added to a Linux system, it is not configured to start automatically when the system starts up. So, by default, whenever you add a new service, you'll have to start it manually after the system reboots. 'chkconfig' command allows you to configure that newly added service to start after every system start up automatically. Not only this, you can change the configuration so as to add any service at different run-levels. With 'chkconfig' you can display the list of services those are configured for startup at a particular run-level.



This article explains the use of 'chkconfig' command in Linux.

1. Check Service Status

With 'chkconfig', you can determine whether a service is configured for startup, using the 'exit status' of the command. For this, just mention the service name as an argument to 'chkconfig' command. If the service is configured for startup, it's exit status will be '0', if not then it will be '1' (or non-zero).

Note: Exit status of any command can be determined by executing echo $? immediately after that command is executed. Exit status '0' denotes successful command execution, while non-zero exit status indicates that there was some error in executing that command or the command failed to execute.

Syntax:

chkconfig <SERVICE-NAME>
Example:

MyLinuxBox mandar ~ > chkconfig sshd
MyLinuxBox mandar ~ > echo $?
0
MyLinuxBox mandar ~ > chkconfig smbd
MyLinuxBox mandar ~ > echo $?
1
You can make use of this exit status in a bash script as follows (provide service name as an argument to the script):

#!/bin/bash

chkconfig $1

if [ $1 -eq 0 ]
then
    echo "Service $1 is configured for startup."
else
    echo "Service $1 is not configured for startup."
fi
Or simply:

#!/bin/bash
(chkconfig $1 && echo "Configured!") || echo "Not Configured."

2. Display configuration status of all services

When 'chkconfig' is executed with option --list, it will display all the services and their startup configuration status.

MyLinuxBox mandar ~ > chkconfig --list
NetWorkManager   0:off   1:off   2:off   3:on    4:off   5:on    6:off
abrtd            0:off   1:off   2:off   3:on    4:off   5:on    6:off
acpid            0:off   1:off   2:on    3:on    4:on    5:on    6:off
atd              0:off   1:off   2:off   3:on    4:on    5:on    6:off
.
.
.
.
As above command will display all configuration of all the services, it might be very difficult to locate a particular service in that long list. Here, 'grep' would come to the rescue. Let's verify the startup configuration of 'sshd' once again.

MyLinuxBox mandar ~ > chkconfig --list | grep sshd
sshd   0:off   1:off   2:on    3:on    4:on    5:on    6:off
With the combination of chkconfig and grep, you can find all the services which have been configured to start at a particular run-level, as follows:

Syntax:

chkconfig --list | grep 3:on

3. Adding and Deleting Services

'chkconfig' command with the options --add and --del would add and delete, respectively, services would be turned on the run-levels 2 through 5. Let's suppose, we have newly installed 'vsftpd' on our system. So, its startup configuration would look like:

MyLinuxBox mandar ~ > chkconfig --list | grep vsftpd
vsftpd   0:off   1:off   2:off   3:off   4:off   5:off   6:off
Lets add it to the startup configuration.

MyLinuxBox mandar ~ > chkconfig --add vsftpd
MyLinuxBox mandar ~ > chkconfig --list | grep vsftpd
vsftpd   0:off   1:off   2:on    3:on   4:on    5:on    6:off
Lets now remove the 'vsftpd' service from the startup list.

MyLinuxBox mandar ~ > chkconfig --del vsftpd
MyLinuxBox mandar ~ > chkconfig --list | grep vsftpd
vsftpd   0:off   1:off   2:off   3:off   4:off   5:off   6:off

4. Add or Remove a Service at a particular run-level

'chkconfig' command when executed with --add or --del options, it would impact all the run-levels from 2 through 5. In order to turn on or off any particular service at a particular run-level, you can use:

chkconfig --level <LEVEL> <SERVICE> <on/off>
Example:
MyLinuxBox mandar ~ > chkconfig --level 35 vsftpd on
MyLinuxBox mandar ~ > chkconfig --list | grep vsftpd
vsftpd   0:off   1:off   2:off   3:on   4:off   5:off   6:off

MyLinuxBox mandar ~ > chkconfig --level 35 vsftpd off
MyLinuxBox mandar ~ > chkconfig --list | grep vsftpd
vsftpd   0:off   1:off   2:off   3:off   4:off   5:off   6:off

5. How it works?

Just take a look at /etc/rc.d directory and its contents. It has some directories named rc0.d, rc1.d, rc2.d, rc3.d, rc4.d, rc5.d and rc6.d. Each directory is associated with a run-level. Whenever a service is added/removed to/from the startup, a file (or a script file rather) linking to the corresponding service in /etc/init.d is created in /etc/rc.d/rcX.d directory, where X is the run-level.

For example, if service 'vsftpd' is added to the startup at run-level 3, a script (with name somewhat like S24vsftpd) would be created in /etc/rc.d/rc3.d which will be linked to /etc/init.d/vsftpd file. If the service is removed from startup, the filename would still be pointing to the same file, but it's name would be something like 'K24vsftpd'.

Note: If the file name starts with 'S', the service will be started at that particular run-level, whereas if the file name starts with 'K', the service will be killed.

Check:
1. Make sure that 'vsftpd' is turned off at all levels.


2. Check in /etc/rc.d/rc3.d and /etc/rc.d/rc5.d directories for any scripts related to 'vsftpd' service.


Yes, as expected, we could find a file, whose name starts with 'K', in both rc3.d and rc5.d directories.
3. Add the 'vsftpd' service to the startup at run-levels 3 and 5.


4. Now, check again for any entries for 'vsftpd' in rc3.d and rc5.d directories.


Yes, there are !!

That's all for this article. Stay tuned for a lot more articles on various Linux commands.




    Total Pageviews