Linux desktop application question and answer
Summary
Linux desktop application Q & A (2004-11-01 10:45:42)
By lanf, source: http://tech.ccidnet.com/pub/Article/c302_a170849_p1.html
Author: Dumb Source: SEOUL - Open Systems World Q: How do I delete files invisible characters in the file name with? A: List the file name and dump to a temporary file, such as the TMP, the command is as follows: #ls -l> TMP then edit the file, add the "RM" command, delete the format of the above file, specifically: #vi TMP [ RM -R *******] With the following command to add execution permissions: #CHMOD XTMP finally execute $ TMP. Q: How do I set the roller mouse (MC1011) in the Red Hat? A: After entering X-WINDOW, select the configuration of the mouse, then select "Wheel Mouse (PS / 2)". If the mouse is abnormal, restart your computer. Q: Because it is used to operating under Windows 2000, it is always mistaken under Linux, and the "CTRL Alt Del" restart system is pressed. How do I make "CTRL ALT DEL" fail? A: Modify the / etc / inittab file, plus # before "CA :: CtrlatdDel: / sbin / shutdown -t3 -r now", then save the exit, perform the following command, the parameter Q represents the modification to take effect: #Telinit Q : How to start X-window in the depth of the specified color? A: Use the following command to: #startx --bpp n where N represents the color depth, the following is the value of n:
n = 8 // 256 colors;
N = 16 // 65536 colors;
n = 24 // 24 bit color;
N = 32 / / is equivalent to 24-bit color plus an alpha channel. Q: I want to log in through the COM1 port. How do I do? A: First confirm that there is / sbin / agharge, then edit / etc / inittab, add the following: 7: 2345: Respawn: / sbin / agletty / dev / ttys0 9600 9600 is the default rate, or 19200, 38400 57600 or 115200. Then modify / etc / securetty where TTYS0 is added therein. This ensures that the root user can log in with COM1 port. Q: Can you decompress multiple.zip files at once in Linux? A: Can you. Users can use the following command, but pay attention to the quotation marks: #unzip "*" Q: When setting X-WINDOW, select the use of the virtual screen, resulting in the problem that the screen is greater than the display area of the display. How can I cancel? A: Modify the / etc / x11 / xf86config file, find a row with "Virtual" and you can comment out. Q: I often hear ISO files. How to transfer the disc file into ISO file? A: You can transfer the disc file into the ISO file using the following command: #cp / dev / cdrom xxxx.iso Q: Use the new version of the Mozilla browser in the Linux environment, which does not want to install the plugin at all. How to cancel? A: The solution is simple. The user enters the plug-in directory of Mozilla, the default is / usr / local / mozilla / plugins, moves the libnullplugin.so file in the directory to any other directory, such as / opt / backup directory, then execute the following command: #CD / usr / local / mozilla / plugins
#mkdir / OPT / BACKUP
#mv libnullplugin.so / opt / backup After you have completed the Mozilla, you will prompt whether you turn off the prompt dialog after it starts the completion. Q: How do I quickly watch the boot hardware detection after Linux is running? A: Users can try the following command: #dmesg | more Q: What does the last two numbers in the final configuration item in the FSTAB? A: The first FS_FREQ, used to decide which file system needs to perform DUMP operation, 0 is not needed. The second fs_passno is the order sequence number of the FSCK program to detect the disk when the system is restarted. 1 is the root file system, 2 is another file system. FSCK Detects the disk according to the serial number, 0 indicates that the file system is not detected. It is also necessary to explain that DUMP performs backup operations, FSCK detection, and repair file systems for DUMP execution of EXT2. Q: Under Linux, the display often enters the sleep state, how can the display sleep? A: You can use the following command to try: #setterm -blank n (n is waiting time) Q: MySQL's root password forgot, is there a way to recover? A: The user can restore the following steps: 1. Use the "su" command to switch to the Linux root user, execute the following command: #kill `Cat / mysql-data-directory / hostname.pid` // mysql PID file Generally under the mysql installation directory 2. Use the "-skip-grant-table" parameter to start MySQL. 3. Use the following command to change the password with the "grant" command: #mysql -h hostname MySQL users can also use the following command: #mysqladmin -h hostname -u user password 'new password'4. Use the following Command Load Permission Table: #mysqladmin -h hostname flush-privilege or use the SQL command "flush privilege" to complete. Q: I always forget to use "Ctrl D" or EXIT to log out of the account, can not be able to do it after the specified time is not active, the system is automatically logged out? A: Yes. Just add the following sentences in ~ / .bashrc file: tmout = 600, will automatically log out of the system after 10 minutes. Q: I want to burn the disc in Linux. What software can I use? A: Users need to install both CDRecord and Mkisofs. These are tools for command line. If you have an XCDroast or Koncd, you can do it below the X-WINDOW. The specific steps are as follows: # mkisofs -r -o sample.iso my_private / / / to make an ISO file, -r represents all file properties into owner is readable properties, -o represents output # cdrecord -scanbus // Detect the recorder's information, when it is burned, this parameter is used # cdrecord -v speted = 16 dev = 6, 0 sample.iso // start burning, speed represents the burning speed, the parameters behind the dev are the next step Information, 6 represents Target, just detected 6; 0 represents LUN, is the logical drive number of the SCSI device, generally 0.
Q: How to modify the time zone under the command line? A: You can modify the time zone: #timeconfig Q: I want to pack the / opt directory with the "tar" command, but I don't want it / opt / tmp And / opt / mail, how do you do it? A: You can implement the following command, but don't add "/" behind the directory: # TAR ZCF OPT.TGZ / OPT --ExClude / Opt / Tmp --ExClude / Opt / Mail Q: Whether the application under Linux is There is also a 2000 issue? A: No, but there is a 2106 issue. Linux's system time is an integer and is currently 32-bit. It represents the number of seconds that start counting from 0:0am 0:0am, January 1, 1970. 2 ^ 32/3600/24/365 is a general time it overflow, this year is 136, 1970 plus 136 is 2106. Q: How to make Apache only listen to a specific IP? A: Modify httpd.conf, add the following line inside: Bindaddress 192.168.0.2 This will allow Apache to listen to the external HTTP request for 192.168.0.2. If you use the following manner, the apache listens to HTTP requests on all network interfaces: bindaddress * Q: How to use USB hard drives correctly under Linux? A: You should generally follow the following steps: 1. First run the following command: #fdisk -l / dev / sd? 2. After executing the above command, if there is no information display, the user needs to perform the following command: #MODPROBE USB-Storage This can use a USB hard drive correctly. Q: How do I add Linux to the boot menu of Windows NT / 2000? A: You can do it as follows: 1. After installing all Windows series operating systems, load Linux and install LILO to the partition where LINUX is located, not MBR; 2. Launux, execute The following command loads a Windows partition: #mount / mnt / dos3. Perform the following command. In this way, there is a bootsect.lin file in the Windows partition, which records the launch information of the Linux partition: #dd if = / dev / hda? BS = 512 count = 1 of = / mnt / dos / bootsect.lin4. In Windows NT startup configuration file Boot.ini Add the following line: c: bootsect.lin = "Red Flag Linux 4.0" and then start the computer, discovers the "Red Flag Linux 4.0" option in the Windows NT startup menu. Select it to start Linux. Q: I have installed LILO on my machine, but I am not moved on the MBR. How do I move it on MBR? A: Modify the lilo.conf file, change the / dev / hdax in the first line to / dev / hda, and then run "lilo". Q: How to make Tail be able to read the latest file content? A: Use the following command: #tail -n 10 -f /etc/httpd/logs/access.log Q: Is there a command to enter some directories under Linux? A: Type "CD ~" to enter the user's Home directory; type "CD -" to enter the previous entry directory.
Q: What should I do if I want to show a color directory list under Red Hat? A: Open the / etc / bashrc file, add the following line: Alias Ls = "LS - COLOR" Next time you start BASH, you can display a list of colored directories like it in other Linux versions, where the color has the following: Blue → catalog;
Green → executable;
Red → compressed file;
Light blue → link file;
Gray → Other files. Q: When you type some commands, such as Find, ShutDown, Mount, and StartX, I want to know which directory is put in? A: You can implement it with the command "whereis", as follows: #whereis startx