A.4. System Configuration and Administration

Do I need to be afraid of a virus in Linux?

In Linux, there have been no serious viruses found. Also, viruses cannot cause any serious damage if they are not activated by root. The only virus scanners available in Linux search e-mails for Windows viruses (if Linux is used as a router or server). Nevertheless, you should back up important data and configurations.

I cannot find any .exe files. Where are all the applications?

In Linux, executable files normally do not have file extensions. Most programs are located in /usr/bin and /usr/X11R6/bin.

How can I recognize executable files?

The command ls -l returns all executable files in the directory /usr/bin in green. Also recognize them by the x in the first column.

-rwxr-xr-x   1 root   root  64412   Jul 23 15:23 /usr/bin/ftp
How do I start a service or an application at boot?

To start certain services at boot, use the YaST module System Services (Runlevel). Find a detailed description of this module and some background information about the boot and runlevel concept of Linux in the Administration Guide.

To configure GNOME to start any application automatically when it starts, open the GNOME Control Center and choose System+Sessions. Open the tab named Startup Programs and enter the application you want started.

In KDE, start Konqueror and open the folder .kde/Autostart in your home directory. Drag the application icon from the main menu into the Konqueror window and choose Link Here. The application will be started the next time you log in to KDE.

I only have an application in source code. How can I install it?

Before trying to compile an application on your own check whether it already exist as installable RPM. Try Web sites like http://packman.links2linux.org/ or http://rpmfind.net.

Decompress the archive with tar xvzf name.tar.gz, read the INSTALL or README files, and follow the instructions. If compiling on your own, note that neither the compilation nor the resulting application are covered by the installation support.

Do I need to compile a kernel myself?

No, it is usually unnecessary and strongly discouraged for inexperienced users to recompile the kernel. Do so only at your own risk. In cases of custom compiled kernels, SUSE cannot provide any installation support.

How can I defragment my hard disk?

Linux file systems prevent fragmentation. However, make sure that you do not use more than 80% of each partition. The fuller your hard disk, the more “fragmentation” you get, even under Linux. Use df -h to view information about used and available hard disk space.

I need more space for Linux. How can I add another hard disk?

To make more space available, integrate a new hard disk or parts of it (partitions) into your Linux system at any time. For example, if it turns out that you need more space in /opt, mount an additional hard disk partition to this directory. To do so, follow this procedure:

  1. Install your hard disk following the instructions of the manufacturer then start Linux.

  2. Log in as the root user.

  3. Partition the new hard disk with fdisk. For further information, refer to the manual page of fdisk with man fdisk.

  4. Format the partition with mke2fs /dev/hdb1.

  5. Enter the following commands:

    cd /opt
    mkdir /opt2
    mount /dev/hdb1 /opt2
    cp -axv . /opt2

    Check thoroughly to see whether all the data has been copied. Afterwards, move the old directory and add a new one—an empty mount point:

    mv /opt /opt.old
    mkdir /opt

    Use an editor to add the new partitions in /etc/fstab. This could resemble the line in Example A.1, “Sample Line in /etc/fstab for an Additional Partition”.

    Example A.1. Sample Line in /etc/fstab for an Additional Partition

    /dev/hdb1       /opt     ext2      defaults   1   2

    Now, shut down the computer and reboot.

  6. After rebooting, check that /dev/hdb1 has actually been mounted to /opt using the command mount. If everything is working as desired, remove the old data from /opt.old:

    cd /
    rm -fr opt.old
How can I find out how much space is available in Linux?

Use the df -hT command. -h converts the byte sizes into human readable format (such as 1K, 234M, or 2G) and -T prints the type of file system.


SUSE LINUX User Guide 9.3