Change Hostname

Debian based systems use the file /etc/hostname to read the hostname of the system at boot time and set it up using the init script /etc/init.d/ So on a Debian based system we can edit the file /etc/hostname and change the name of the system and then run,

# /etc/init.d/ start

To make the change active. The hostname saved in this file will be saved on system reboot.

Start applications on boot (Debian)

update-rc.d is the utility that Debian provides to manage init scripts. It is similiar to Redhat’s chkconfig. Say, you have a new service called “mine” that you would like to start at boot time. Make sure that the file “/etc/init.d/mine” exists. Below is the command that you can type to make your service run at boot time.

# update-rc.d mine defaults

This will make sure that when your system reaches runlevel 2, 3, 4 or 5 that the “mine” service will start up and that in runlevel 0, 1 or 6 it will be stopped. So you’re done with your “mine” and you would like to stop them from starting up when you reboot? Use the command to remove it from starting up at boot time:

# update-rc.d mine remove

To start up in runlevels 2 or 3, you could run the following command:

# update-rc.d mine start 45 stop 01236

Mine will start up when your system reaches runlevels 4 or 5, but stop at 0, 1, 2, 3 or 6.

rcconf ( apt-get install rcconf ) tool is a graphical interface that can be used from the shell to configure your init scripts.

Disable USB Devices

The modprobe can be configured to not load the USB storage driver upon demand. This will prevent the modprobe program from loading the usb-storage module, but will not prevent root from using the insmod program to load the module manually.

Enter the following command:

# echo ‘install usb-storage : ‘ >> /etc/modprobe.conf

You can also remove USB Storage driver, enter:

# mv /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko /root

BIOS option

You can also disable USB from system BIOS configuration option. Make sure BIOS is password protected.

Grub option

You can get rid of all USB devices by disabling kernel support for USB via GRUB. Open grub.conf or menu.lst (Debian/Ubuntu Linux) and append “nousb” to the kernel line as follows:

kernel /vmlinuz-2.6.18-128.1.1.el5 ro root=LABEL=/ console=tty0 console=ttyS1,19200n8 nousb

Save and close the file, just reboot the system. You are done šŸ˜‰

Disable Wireless Networking (Wi-Fi)

Use the following commands to list installed devices (list PCI devices):

# lspci

Go to /lib/modules/$(uname -r)/kernel/drivers/net/wireless and remove wireless driver.

# mkdir -p /root/backup/
# mv /lib/modules/$(uname -r)/kernel/drivers/net/wireless /root/backup/
# reboot

Above will remove the kernel drivers that provide support for wireless devices and it will prevent users from activating the devices.

Deactivate Wireless Interfaces (Remove Config Files)

You can also deactivate the wireless interfaces. Open terminal and type the following command to list the wireless interface:

# ifconfig

Turn off wireless interfaces after identifying the same with ifdown command:

# ifdown interface

Finally, remove wireless configuration file /etc/sysconfig/network-scripts/ifcfg-interfaceName.

# mv /etc/sysconfig/network-scripts/ifcfg-wlan0 /root/backup

OR just remove config file, enter:

# rm /etc/sysconfig/network-scripts/ifcfg-wlan0

Above will make sure wlan0 will not return after the next reboot.

How Do I Restore Wi-Fi Again?

Just copy back all files and reboot the system:

# mv /root/backup/ifcfg-wlan0 /etc/sysconfig/network-scripts/ifcfg-wlan0
# mv /root/backup/wireless /lib/modules/$(uname -r)/kernel/drivers/net/wireless
# reboot

For Debian/Ubuntu Systems, you need to edit /etc/network/interfaces file to remove wireless configuration and you need to remove /lib/modules/$(uname -r)/kernel/drivers/net/wireless directory.


What is DSL?

Damn Small Linux is a very versatile 50MB mini desktop oriented Linux distribution. It is small enough and smart enough to do the following things:

Boot from a business card CD as a live linux distribution (LiveCD)
Boot from a USB pen drive
Boot from within a host operating system (can run inside Windows)
Run fully in RAM with as little as 128MB
DSL is highly extendable without the need to customize

DSL was originally developed as an experiment to see how many usable desktop applications can fit inside a 50MB live CD. It was at first just a personal toy. But over time, it grew into a fully automated remote and local application installation system and a very versatile backup/restore system which may be used with any writable media including a hard drive, a floppy drive, or a USB device.

DSL has a nearly complete desktop, with limited number of command line tools. Damn Small also has the ability to act as an SSH/FTP/HTTPD server right off of a live CD.

XMMS, FTP client, web browsers, spreadsheet, Sylpheed email, spellcheck, a word-processor, three editors, graphics editing and viewing, Xpdf, file manager, Naim, VNCviwer, Rdesktop, SSH server and client, DHCP client, PPP, PPPoE , a web server, calculator, generic and GhostScript printer support, NFS, Fluxbox and JWM window managers, games, system monitoring apps, a host of command line tools, USB support, and pcmcia support, wireless support.

What Is Linux


In the early 90s, a geek named Linus Torvalds at the University ofĀ  HelsinkiĀ  in Finland thought it would be fun to write a Unix kernel from scratch. He called it Linux, and it was cool but pretty much useless without all the utility programs needed to make it a complete operating system. At the same time, Richard Stallman and his pals at the Free Software Foundation were writing a bunch of freeware Unix utilities collectively known as the GNU Project. It was cool but pretty much useless without a kernel to make it a complete operating system. Fortunately, the two parties decided to collaborate.

News of Linux spread quickly over the Internet, and many other Unix programmers joined the effort to enhance it. What we now know as Linux is a combination of Torvaldā€™s Linux kernel, the GNU Project software, and some other nifty software bit and pieces developed by programmers from all around the world.