Linux operating System 12 Classic application Techniques _unix Linux

Source: Internet
Author: User
Tags unpack

This article introduces the 12 classic techniques of Linux operating system application, which can be used to better use Linux system.

1, processing the special file name

Assuming that the Linux system has a file named "-ee", if we want to operate it, for example, to delete it, in accordance with the general deletion method in the command line to enter the Rm-ee command, the interface will prompt us is "invalid option" (invalid option), originally due to the first word of the filename identifier "-", Linux to the file name as an option, we can use the "--" symbol to solve this problem, enter the "RM---ee" command can be successfully deleted named "-ee" file. If you have other special characters, you can add a "" symbol before the special character, or enclose the entire file name in double quotes.

2, directly to install the Linux work

When installing the Linux operating system, you can take advantage of a software called "Loadlin.exe" in the system CD to transfer the Linux core directly into memory, replacing the Linux core with the current operating system to take over the computer and into the Linux installation interface. When Linux is installed, we can simply install Linux by typing "loadlin e:imagesvmlinuz root=/dev/ram initrd=e:imagesinitrd.img" In the Run dialog box; "E: Imagesvmlinuz "is the core name of Linux.

3, eliminate the xwindows under the crash phenomenon

We can use two commonly used methods to eliminate this phenomenon: first, use the keyboard of the composite key "Ctrl+alt+backspace" to close the currently running task; second, first hold down the keyboard "ctrl+alt+f2" compound key, let the system switch to another console, Then log on to the system, and then execute the "#ps-ax/grep startx" command, which will list your xserver process identity, and then enter the following command on the command line to eliminate the panic under Xwindows: #kill-9 Pid_number, finally through the " ALT+F1 "The composite key returns to the original platform.

4, Fast shutdown Linux system

The latest version of the Linux/unix system borrowed from the mainframe technology, the use of power-off log-type file system, can automatically track the preservation of user data, automatic synchronization of the file system, users can easily turn off the power supply, so as to achieve rapid shutdown of the system.

5. Use the "rm" command skillfully

We can use the RM command with the "-r" parameter to delete a non-empty directory, such as the "rm-r BBB" command at the command line, indicating that all files and subdirectories contained in the BBB directory will be removed by the system.

6, clever use of "tab" key

As you know, when you enter commands in the Linux character interface, you sometimes need to enter a lot of characters, which is more troublesome if you type the characters one by one. Assuming that the character you type is sufficient to determine the next unique file in the directory, we can automatically complement the rest of the file name by pressing the "tab" key on the keyboard, for example, to unpack the file "ddddddd-1.2.3.tar.gz" in the directory/CCC, when we type in the command line Tar xvfz/ccc/d ", if the file is the only file in the directory that starts with" D ", you can press the" tab "key, and the command is automatically padded with the following: Tar xvfz/ccc/ddddddd-1.2.3.tar.gz, which improves the efficiency of the input.

7, use the mouse to copy and paste more to improve the operation speed

Linux system after installation, each boot to the character interface will automatically run a "gpm" program, the program can be run after the mouse to copy and paste. The practice is to hold down the left mouse button to make copies of the place highlighted, when the highlighted area has been copied, and then the right mouse button copy content will be pasted at the cursor location. If we run the Linux system under Xwindow, the copy-and-paste operation is the same as under the Windows 9x system.

8. Start Linux system quickly

In DOS, there is a simple way to quickly start Linux, that is, load Linux. Loadlin.exe is a DOS executable program that can quickly start Linux in a pure DOS environment without restarting the computer, and usually we can find this program in the "/kernels" directory on the CD. If you do not know where the program is placed on the installation disk, you can use the "find-name loadlin*" command to find it. When you find it, copy it to a DOS partition, and you'll need to copy the Linux kernel file you're using. You can copy it directly from the CD through Windows, or you can copy the file to a DOS partition using the "mcopy" command in a Linux environment, and then write a batch file called "Linux.bat", which reads as follows: C:loadlin C:vmlinuz root= /DEV/HDA1 RO (We assume that Loadlin.exe and vmlinuz these two kernel files are in the C-packing directory, "root" for the Linux root device, and Linux is in the first partition of the hard disk, so the device named "/dev/hda1", "Ro" Meaning readonly). Later in DOS to start Linux, run "Linux.bat" on it.

9, increase the virtual cache

Using commands: Mkswap/dev/hda (assuming Linux drives are/DEV/HDA), Swapon/dev/hda, to automatically start swap, you can add the new partition to the Etc/fstab, according to the original swap write on the line. With "free" check the size of swap, Linux supports up to 16 swap partitions, each swap partition maximum 128M, no idle partitions, you can use a large file to build.

The following is a series of commands executed:

#dd If=/dev/zero of=swapfile bs=1024 count=8192
#mkswap Swapfile 8192
#sync
#swapon Swapfile

10. Use the TAB key skillfully

We know that in the Linux character interface input commands, sometimes need to enter a lot of characters, if it is often so one by one to enter characters, more cumbersome. Assuming that the characters you type are sufficient to determine the next unique file in the directory, we simply press the TAB key on the keyboard to automatically complement the rest of the file name, for example, to unpack the files under the directory/CCC when we type ddddddd-1.2.3.tar.gz to the tar xvfz in the command line CCC/D, if the file is the only file in this directory that starts with D, you can press the TAB key directly on the keyboard, and the command is automatically padded with the following: Tar xvfz/ccc/ddddddd-1.2.3.tar.gz, which improves the efficiency of the input.

11, more use copy and paste to improve operating speed

Linux system after installation, each boot to the character interface will automatically run a program called GPM, the program can be run after the mouse to copy and paste. The practice is to hold down the left mouse button to make copies of the place highlighted, when the highlighted area has been copied, and then the right mouse button copy content will be pasted at the cursor location. If we run the Linux system under Xwindow, the copy and paste operation is the same as under the normal Win9x system.

12. Improve the speed of reading disk

Some settings under Linux allow Linux to work in 32-bit input and output mode and DMA channel mode. When setting, enter the command/sbin/hdparm-cl/dev/hda in the Linux command interface to turn on the 32bit transmission mode, enter the command/sbin/hdparm-dl/dev/hda to turn on the DMA transfer mode, and then enter the command/sbin/ Hdparm-kl/dev/hda make the hard drive still maintain the above settings after reset, through these settings, we can improve the Linux read disk speed to more than 1 time times.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.