Penguin’s progress - 50 Tips and Tricks for Linux

Ask any PC user to name an operating system and the word Windows will probably roll immediately off the tongue. Not far behind, however, will be Linux. In fact, Linux has firmly established a reputation as the alternative system of choice. We bring you 50 top tips on getting the best out of your Linux-based system.

  • E-Mail
By  Vijaya George Published  July 22, 2002

I|~||~||~|Linux may have started off by finding favour with just a few renegade programmers who wanted to thumb their noses at proprietary software but, today, the upstart operating system (OS) is also generating a certain mass appeal. This is no small part thanks to distributions like Red Hat, Mandrake and SusE (to name a few) that have worked hard to simplify the installation process and make them more user-friendly — with graphic interfaces to match that of the Windows OS.
The corporate world, particularly, has displayed more than just a passing fancy in Linux; primarily due to its low cost of ownership, its ability to function on low-end systems, its reliability, stability and (perhaps more significantly) its high resistance to virus attacks. In the Middle East region, million dollar deals have been signed for the deployment and maintenance of Linux systems in companies such as Saudi Aramco and Oman Petroleum. Governments in the region have seen in the OS an opportunity to develop personalised versions, in which they can incorporate their own security measures for defence purposes. In doing this, they hope to shake away the monopoly of proprietary software and develop systems that they will eventually have better control over.

However, end-user interest in Linux has little in common with the factors that have urged companies to adopt it. With end-users, it has been more of a new toy to fiddle around with — and those who have managed to get past the installation are sure to want to tweak their systems a bit to listen to MP3 files, use imaging software, add a printer, browse the Net and try different desktop screens.

These 50 tips and tricks are primarily aimed at such users; those who want to take the next step forward towards using Linux. The first 25 or so tips are for beginners, while the rest are for the average to the advanced Linux user. Additionally, they are primarily applicable to Red Hat 7.3, which is scheduled for release in the Middle East market shortly, but can also be tried on other 7.x versions.

But before you go off exploring, do be aware that Linux (as with any OS) comes with a list of dos and don’ts. All errors can be rectified by the pros but one tiny mistake could get an amateur into a fix. So we recommend that you do not test these commands in your work environment unless you know the exact nature of a command. It is also recommended that you do not log in as "root” to make changes unless you face system permission restrictions that do not permit you to make changes.

1. Desktop cycle.
Cycling through desktops need not be a tedious task anymore. Simply press [Ctrl]+[Tab] or [Ctrl]+[F1-F12] to cycle through desktops. By holding [ALT] + [TAB], you can also cycle through open applications.

2. How to change your desktop background quickly.
To configure a background, you can drop an image file from konqueror to the desktop. If you only intend to change the background colour, simply drag and drop the colour from the colour selector of any application to the desktop.

3. How to use KDE to browse the local network (LISa).
Click on the “Control Centre” in the KDE panel bar. In the left-hand menu choose Network/ LAN Browsing. Then, manually set up the network setting such as IP address and Netmask. (“Guided LISa Setup”, Autosetup” can be used). Apply the changes.

Open a terminal window and issue the “lisa” command (KDE3 only). “lisa –K” can be used in older versions of KDE as well.

Now open the Konqueror (simply by clicking on the Home desktop icon) and use the LAN Browser to show the resources on the LAN.

4. Retrieve a lost root password.

Lost your root password? Depending on what type of bootloader you are using — LILO or GRUB — follow the corresponding instructions below:

LILO bootloader: While booting, you will see the LILOscreen asking you to choose your operating system (if you have a dual boot, where you can log into Windows or Linux). Press [CTRL]+x and you should get the following prompt:
Log on to single user mode as below:
boot: linux 1
The computer should boot normally until you see the shell command prompt. In the shell prompt type:
Define a new password and confirm it. Reboot by pressing [CTRL]+[ALT]+[DEL]

GRUB: While booting, you will get the GRUB screen where you can pick your operating system. Choose your operating system and then press "e" on the highlighted item. Choose the line that begins with the word "kernel", press "e" again and add "single" at the end of the line. Press and then "b" to boot. Follow the LILO (mentioned above) method after you get to the prompt.

CD: Boot from the CD and then type "linux rescue" . Choose your language and keyboard. When you get to the sh-2.05#, type "chroot/mnt/sysimage" . Follow the LILO method after you get to the shell prompt. Instead of pressing [CTRL]+[ALT]+[DEL], type exit , exit.

5. Playing MP3 and MGP files:

XMMS is a good utility to play MPEG files. XMMS is very similar to Nullsoft Winamp. It can even play MPG video files. Skins and plug-ins are available for download from

To run XMMS, on the KDE desktop, go to Main K Button => Multimedia => XMMS

6. How to get a screenshot in KDE:

In Windows depressing the “printscreen” key allows you to take a snapshot of the current screen.
Likewise, in KDE, you have a utility that will enable you to take a snapshot of the entire desktop or any particular window.
This utility is called Ksnapshot and can be found in K Main Menu Button (on the panel) => Graphics => Ksnapshot .

To use it, specify a timeout in seconds and click on the “Grab” button. Choose the window that you want to take a snapshot of. When the time you have specified is up; Ksnapshot will take the snap and you can save it as a PNG or a JPG.

7. Copy and Paste

In Linux, there is an advanced method for copying and pasting text. All you have to do is highlight the text you want to copy, then place the cursor and press the middle button on your mouse to paste. (This, of course, applies if you chose 'Emulate third button' during installation and have a mouse with a third button. Otherwise, depressing the right + left mouse buttons should do the same job if you chose the option “Emulate third button”.)

Alternatively, you can use the Windows command [CTRL]+c,v,x or also, [ALT]+c,v,x to copy, paste or cut.

8. Show Desktop.

In MS Windows, if your desktop is cluttered, then you can click the show desktop icon and everything will be minimised. However, you can’t have more than one desktop for different purposes. For instance, you can’t have one desktop for publishing, another for Web browsing and yet another for e-mail. In Linux, having multiple desktop features solves this problem.

Give it a try. Open a programme such as a Web browser. Now press [CTRL]+F2 and open another application like Kword. You can easily switch between different desktops by pressing either [CTRL]+F1 or [CTRL]+F2. You can open as many applications as you want in each window, and when you switch back to it, you will find them all there.
Clicking on a sticky button located on the top-left of each window will also help to show that window in all the desktops.

9. Quick access to the help pages in KDE.

Press [CTRL]+o while in Konqueror and type "#" followed by the command that you want help on. Then, click "Ok".

10. Browse quickly

To quickly go to a Web site, click on the KDE Kmenu and click on "Run Command" or press Alt +F2. Then type the URL and press enter.

11. Change the size of the window.

Press and hold the [ALT] key. Then, press and hold the right mouse button. If you drag your mouse around, you should be able to resize your window.

12. Personal Firewall.

On the desktop, open the KDE control panel and click on Lokkit (firewall). Choose the security level (High, Medium or None). Customise your firewall by answering questions about services and ports.
Then click on “Finish”.
At the end, enable the relaying check for your system.

13. Changing your display resolution.

Log in as root and open a terminal .In the command line, type “setup” and use the arrow keys. Select the X configuration, then select your monitor, display adapter, video memory, resolution and colour depth. Test your setting and approve it.

Restart the Xwindow by typing, “kill kdm” (if you are using Gnome login use “kill gdm”. By holding BACKSPACE] you can restart the X session.

If you have chosen multiple resolution, you can simply change it by holding [ALT]+[CTRL] and pressing + or -.

14. Transparent Menus

In order to make K, popup or drop down menus transparent, run the control centre from the panel. Then, click on Look&Feel/Style/Effects and check "Enable GUI Effects". On the menu effect, choose "Make Translucent". By changing the opacity value, you can increase or decrease the degree of transparency.

To make your "Konsole" transparent, click on setting/Configure Konsole and change the transparency manually or from the Setting menu/Schema/ select transparent items.

15. Change the default desktop setting.

In KDE 2.2.1 and above, when a user logs in for the first time, he will be asked to choose a language, the look and feel of the desktop and the effect level. For instance, the language could be English, KDE/windows type would be chosen for the desktop and medium level for effects. If you ever need to change your previous settings, simply click on K menu / system / Desktop Setting Wizard. Now use the wizard to change the previous settings.

16. Flash player in Netscape browser in Linux.

If you decide to upgrade your flash player in Linux, go to “”. Macromedia provides a compressed file with the installation instruction. You can upgrade to version 6.0 now.

17. Burn a CD in Linux:

Red Hat Linux 7.3 ships with to graphical CD burner application. In order to burn a CD in KDE, click on “K Menu/Multimedia/KOnCD” or “KMenu/Multimedia/X-CD-Roast”.

In the command line, you can use mkisofs to create CD ISO images and cdrecord to burn a CD.

18. Import MS Outlook Express e-mails and address book into KMAIL

Run “K Menu /Utilities/Kmail/KAB import Tool”. Locate your e-mail database usually with .dbx extensions. (You can find them in you windows directory /Application Data/identities).

To see your e-mail, click on KMAIL icon or go to “K Menu/Internet/Kmail“.

19. Adding and removing applets from KDE panel.

In order to remove any Button, Applet, Panel extension or special button from KDE panel, right click on the icon and select “Remove”. To add Button, Applet, Panel extension or special button, right click on the panel, go to “Add” and choose the application.

This can also be done through “Kmenu/Configure Panel”.

20. DVD/CD Player

Xine is a very powerful DVD player in Linux. You can find it in “K Menu/Multimedia/Xine”.
To play an MPEG file, go to “K Menu/Multimedia/XMMS”. KsCD is a CD player.

You can also find plenty of Linux applications at or

21. Making MP3 files

Grip is a powerful CD-ripper utility to make MP3 files from a CD. If you have installed GNOME packages, it will be in the Multimedia menu in GNOME desktop. You can start it from Kmenu/Programs/Multimedia or in the command line, type grip.

22. Configuring the CUPS Printing System in your browser.

CUPS is an advanced print server which supports IPP (new generation of network printing protocol).
To configure CUPS instead of normal LPRng printing system, follow the instruction below:

In a graphical terminal type, choose CUPS.

Stop and start the following services:
service lpd stop (you must stop the lpd service )
service cups start

Now open a browser and in the location bar type : http://localhost:631 and add a printer.

23. Midnight Commander!

Old DOS users will remember a popular application called NC or Norton Commander.
In Linux, there is a similar application with similar functionalities plus long file name support.

In any text console, type “mc”.

24. How to configure your Soundcard.

Most of the time Linux can detect your sound card automatically, but if it does not, you probably do not have a plug ‘n’ play sound card or your card isn’t supported by Linux.
To make sure your card is supported, check Red Hat HCL (Hardware Compatibility List) on

If your card is in the supported hardware list, then issue sndconfig in the command line. This will load sound configuration screen. Next, You must choose your soundcard model from the list and specify the IRQ, DMA, I/O ports, etc.

System will prompt you for testing the sound card by playing two files, a wave file and a midi file. If these you could hear the sound (In Swedish language he will tell you how to pronounce Linux) accept the setting and reboot.

25. Finding Files

In KDE, click on “K Menu/Find Files”. It will start the find screen. Now you can search for files with date, size name, type and case.

In the command line also, you can search for a file. "locate“ and find can be used to find files.

locate file/directory
find [start directory] -[type] file

26. Running Windows application in Linux using Windows Emulator.

Windows Emulator in Linux can be used to run basic MS windows/dos applications.
In order to use this emulator, first make sure the corresponding packages are installed by typing this command:

rpm –q wine

Log in as a normal user and make a hidden directory in your home directory:

mkdir ~/.wine

To run the application:

wine path_to_the_application

27. Remote control (VNC).

In Red Hat Linux 7.3 (the new release from Red Hat), a feature called VNC is available. VNC is a remote display system, which allows you to view a computing desktop environment not only on the machine where it is running, but also from anywhere on the Internet (remotely) and from a wide variety of machine architectures.

For instance, you can see your Linux desktop from a Windows system or vie versa — i.e. you can see your Windows desktop remotely from a Unix-based system. ( )

In order to use this feature, first check if this package exists on your machine by issuing the following command in a text console:

rpm –q vnc

Then type:

Specify a password. Now your system is ready to act as a VNC server.
To connect to a server:

From another Linux system, type in the text console:

vncconnect address_of_the_remote_machine:port
vncviewer address_of_the_remote_machine:port

To change the login password for VNC server type: vncpasswd

28. Configuring SAMBA via SWAT.

In order to configure samba with the SWAT administration tool, do the folowing:

Start the Xinetd and swat service.
service xinetd restart
chkconfig swat on

Open a browser and connect to the URL http://localhost:901.

29. Changing the default login prompt from text mode to graphical mode.

If during installation, you have chosen “text login” and now you want to change the default login prompt to graphical after reboot, here is the simple way of doing it.

In the text mode, after login, type “pico /etc/inittab”. You should see a basic editor. Find a line which starts with the following text,


In that line, change “3” to “5”. So it should read like this:
Use [CTRL]+x to save and quit the file.

Reboot the system and check if it loads the X login automatically.

30. Disable [CTRL]+[ALT]+[DEL] for rebooting.

In the text mode or in a text terminal, type “ pico /etc/inittab” you should see a basic editor. Find a line which starts with the following text,

ca::ctrlaltdel:/sbin/shutdown –t –r now

add a “# “ in the beginning of that line so it will be like

# ca::ctrlaltdel:/sbin/shutdown –t –r now

Save and quit by pressing [CTRL]+x.

31. Editing your PATH.

Start a text editor, such as pico, at a shell prompt. You can open the file called “.bash_profile “by typing the following:

pico .bash_profile

You will see a PATH statement, similar to the one shown below.


To the end of this statement, add ./ as shown below:


Replace user with your user name and directory with the directory containing the executable file that you wish to run.

Now, press [Ctrl]-x;

You can then make the changes to ” .bash_profile ” and this will take effect immediately by typing the following command:

source .bash_profile

By doing the above, you do not have to manually add ./ to the beginning of the executable to start an application located in the directory that you've added to your PATH.

32. Controlling Processes.

Process management is very important and is similar to task management in Windows NT in that you control the threads.

There are two graphical utilities, “ gtop “ and “ ktop “. To start them, in a X Terminal, type gtop or ktop. To run ktop in KDE hold [CTRL] + [ESC].

Now you can list, kill, or change the priority for your processes. Kill sends a cancel signal to a process.

33. Compress/Uncompress.
You can use Konqueror (file manager) to view the content of archive files such as ZIP, TAR, TGZ, etc. Simply click on "Home" icon on the desktop in KDE and click on any archived file to view the content. By dragging the files and directories to the desired folder, you can extract them. In addition, right clicking on an archived file icon and choosing "Extract here" can extract the files.

By running Kmenu/Utlilities/Ark and dropping file into “ARK” application, you can make your ZIP file.

“Winzip” can extract Linux ZIP files.

34. Creating a Boot Disk

To create a boot disk for emergencies, log in as root and in the command line, issue the following commands:

uname -r

Your kernel version will look something similar to 2.4.xx-yy (for example 2.4.18-3 ) .

Now, insert a floppy in to your drive and issue this command:

mkbootdisk --device /dev/fd0 2.4.xx-yy

If your system fails to boot normally, you can use this floppy disk.

35. Putting an image file to a floppy using dos or Windows

In some cases, where you have a non-bootable CDROM drive, you need to make a bootable diskette from a Linux “.img” file.

To make a diskette using MS-DOS, use the “rawrite” utility included on the Red Hat Linux CD-ROM in the “dosutils” directory. Issue the following command in the DOS command prompt:

C:> d:
D:> cd dosutils
D:dosutils> rawrite
Enter disk image source file name: ..imagesoot.img
Enter target diskette drive: a:
Please insert a formatted diskette into drive A: and
press --ENTER-- : [Enter]

Now you will be able to boot the system with that floppy.

36. Putting an image file to a floppy using Linux.

In order to make an image floppy in a Linux system use this command:

dd if=linux.img of=/dev/fd0 bs=1440k

Alternatively, the following command also works:

cat linux.img > /dev/fd0

Note: you should replace “boot.img” with your image file name and your floppy should not be mounted.

37. Check binary CDs before installing Red Hat Linux 7.3.
A damaged, scratched CD or CDROM drive or a burnt CD might stop in the middle of installation. Assume CD No.3 of Red Hat Linux 7.3 is damaged and you start to install Linux. After installing CD1&2, it won’t be able to complete the installation process because CD3 is corrupted and leaves a non-working system.

It is better to check these CDs before installation with a new tool in Red Hat Linux 7.3.

To do that, boot the system with CD1. After the BIOS loads, it displays a screen that asks you to choose the installation mode —Normal, Text, Driver disk, low-res, rescue or mediacheck.

Choose the linux mediacheck and press . The system will display a screen and ask you to insert CD1, 2 and 3 for surface checking. If it does not report any errors, you can safely carry on and complete your installation.

38. Get access to the windows partitions in a multiple boot system.
If you have a dual or multiple boot system with Linux, you can see the data on the windows partitions without restarting. If you need to do this, run the following command.

Use fdisk –l command to display the partitions list.

Device Boot Start End Blocks Id System

/dev/hda1 * 1 144 580608 51 Win95 FAT32
/dev/hda2 145 210 262080 82 Linux swap
/dev/hda3 211 949 2979648 83 Linux

Write down the device name for the Windows partition according to the partition list. In this example, it is /dev/hda1

Make a directory using: mkdir /Cpart

Then use the following command to introduce it to the system.

mount /dev/hda1 /Cpart

Now you can have access to your Windows drive, which is located in /Cpart directory.

If your Windows partition is in NTFS format, you must enable this NTFS support in the kernel. Only then will you get access but this is only read-only access!

39. Connect to the Windows shared folder on the network using samba client.
To map your windows shares to one of the directories in the system run the following:

mkdir /mnt/win-public (This will make a local directory)
mount –t smbfs –o username=username,password=password //machine_name/share_name /mnt/win-public
(replace the username password of your account in the windows machine and replace machin_name, share_name with Windows machine name and share name of the windows system in the network , “smbclient” command can be used to obtain those information)

smbclient -L //machine_name -N

40. Multi-boot between Linux and MS Windows.
If you already have Windows and plan to install Red Hat Linux on to the same disk, and also want to keep your data and Windows NTLDR do the following steps:

1- Use thirdparty partition management software. For instance, partition magic ( is recommended to resize your Windows partitions and make free space for Linux.
2- Install Linux but in the bootloader configuration section (LILO, GRUB), do not choose MBR (Master Boot Record) as your default. Select the linux partition instead.
3- During installation, make a startup floppy disk.
4- After installation, boot the system with this floppy.
5- Login to the system as root and type the following command in the command line:

dd if={ your Linux boot partition , e.g. /dev/hda2 } of=linux.img bs=512 count=1
mcopy linux.img a:

6- Now reboot the system without the floppy, log in to Windows. Copy the file that you have copied from Linux to “c:” (linux.img), then open the command line and change the attributes of c:oot.ini; edit and add this line : Red Hat Linux = c:linux.img
7- Save the file and reboot your system.
8- Please note that if you are using Windows95/98/me, you must boot the Linux bootloader on to the MBR. There’s no need to follow the rest of the steps.

41. LILO cannot find a kernel on a big drive.

On some big drives, LILO is likely to have problems loading your kernel. The problem is because the hard drive has more than 1024 cylinders and cannot reach more than 8.4 GB on the primary /boot partition (1024*255**512=8422686720).

It is recommended that you define a boot partition less than 8.4 GB (normally 64-128 MB is sufficient) and add the other partitions such as root with any size. However, if you have specified a /boot partition of more than 8.4 GB, you can solve the problem by adding lba32 and linear parameters which enables LBA mode access to the disk in /etc/lilo.conf.

42. Running Programmes at Boot Time.

The file /etc/rc.d/rc.local script is run by init at boot time, after all other initialisation has been completed, and whenever you change run levels. You can add additional initialisation commands here depending on whether you want to start up additional daemons or initialise additional printers or modules.

For instance, to add a module, use this command line:
insmod -f /usr/lib/ (Replace with your module name)

By adding the above line to /etc/rc.d/rc.local, you can load a module at startup.

To run scripts, functions or define environment variables, add them to /etc/profile or /etc/pashrc:

For instance, use

export PATH=$PATH:/directory/application/bin. This will add /directory/application/bin to all the users.

43. Converting to an ext3 File System.

The tune2fs programme can add a journal to an existing ext2 file system without altering the data already on the partition.

To convert an ext2 file system to ext3, log in as root and type:

/sbin/tune2fs -j /dev/hdXY

In the above command, replace hdX with the drive letter and Y with the partition number. After doing this, be certain to change the partition type from ext2 to ext3 in /etc/fstab.

44. Reverting to an ext2 File System.

Because ext3 is relatively new, some disk utilities do not yet support it.

To revert a partition, you must first unmount the partition by logging in as root and typing:

umount /dev/hdXY

In the above command, replace hdX with the drive letter and Y with the partition number.
Change the file system type to ext2 by typing:

/sbin/tune2fs -O ^has_journal /dev/hdb1

Check the partition for errors by typing:

/sbin/e2fsck -y /dev/hdb1

Then mount the partition again as ext2 file system by typing:

mount -t ext2 /dev/hdXY /mount/point

In the above command, replace /mount/point with the mount point of the partition.

Next add:

rm -f .journal

Change the partition type from ext3 to ext2 in /etc/fstab.

45. Controlling services with Serviceconf.

Serviceconf is a graphical application to start or stop Linux services. To start Serviceconf, use one of the following commands:

On the GNOME desktop, go to the Main Menu Button (on the Panel) => Programs => System => Serviceconf.
On the KDE desktop, go to the Main Menu Button (on the Panel) => Red Hat => System => Serviceconf.
Type the command serviceconf at a shell prompt (for example, in a XTerm or a GNOME terminal).

46. Configuring an OpenSSH Client.

SSH is a secure way of connecting to a remote system and it is a replacement for Telnet and rsh. To connect to an OpenSSH server from a client machine, you must have the openssh-clients and openssh packages installed on the client machine.

To log in to a remote machine named, type the following command at a shell prompt:


If you want to specify a different username, use the following command:

ssh -l username



To transfer files from local system to remote system:

scp file

To transfer files from remote system:

scp username@tohostname:/remotefile /newlocalfile

For secure FTP connect user sftp as below:


47. Managing packages using RPM command.

In order to install, uninstall, and upgrade .rpm packages on your system, run the following in the command line:

rpm –ivh /package_location/package_name-X.Y.Z-arch.rpm (Install)
rpm –Fvh /package_location/package-X.Y.Z-arch.rpm (Upgrade)
rpm –e package-X.Y.Z (Uninstall)

Note: For uninstalling, do not write the architecture of the package and .rpm.
Replace X, Y, Z and arch with your package version.

48. Managing packages using GNOME-RPM/Kpackage.

If you are not comfortable with text commands, use the graphical utility to manage your packages.
To start Gnome-RPM, use one of the following methods:

On the GNOME desktop, go to Main Menu Button (on the panel) => Programs => System => GnoRPM

On the KDE desktop, go to Main Menu Button (on the panel) => System => GnoRPM

Type gnorpm or kpackage at a shell prompt.

49. Configuring software RAID after installation.

Assume that you have added a secondary hard disk and plan to configure RAID between partitions to disks. Follow the step-by-step instruction below:

i. Create /etc/raidtab and configure your raid (You can use the template locate in /usr/share/doc/raidtools*)

ii. Configure your RAID devices by invoking these commands:

mkraid /dev/md0
mkraid /dev/md1

iii. Activate your RAID using:


iv. Make a file system on your RAID.

mke2fs /dev/md0
mke2fs /dev/md1

v. To get access, mount your RAID to a local directory:

mkdir /myraid
mount /dev/md0 /myraid

vi. If you want to mount this RAID during system startup, append this line to /etc/fstab :

/dev/md0 /myraid ext2 defaults 0 0

Replace ext2 with ext3 if you made an ext3 file system on your RAID.

50. Managing users.

To add/delete/modify a user account, go to control panel in KDE and run User Manager (redhat-config-users) or in a text terminal, run “kuser”.

Alternatively, the following text based command can do the same:
useradd username (To add a User)
groupadd groupname (To add a Group)
passwd username (To change the password)
usermod options username (To modify user setting)
userdel username (To remove a user)

Add a Comment

Your display name This field is mandatory

Your e-mail address This field is mandatory (Your e-mail address won't be published)

Security code