Highlights of answers to Linux problems in the application process

Source: Internet
Author: User
Article Title: a collection of answers to questions about Linux applications. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
   Q:Why can't I enter Chinese characters while Chinese characters are displayed in Linux? How can I solve the problem of Chinese Input in Linux?
  
A: If you cannot enter Chinese Characters in Shell, you must modify the following two places: Add locale settings in Shell and add input settings in Home Directory, allows the Linux system to accept Chinese output and input. The specific modification is as follows:
  
1. Bash Shell: Add the following content to the/etc/profile or $ HOME/. profile file:
  
Stty cs8-istrip
Stty pass8
Export LANG = C
Export LC_CTYPE = iso-8859-1
  
2. Add the following content to $ HOME/. inputrc:
  
Set convert-meta off
Set output-meta on
  
   Q:I installed Windows NT and Red Hat 6.2 on my computer, and recently installed Windows 2000 Server. However, after installation, we found that LILO was gone. How can I solve this problem?
  
A: You can use either of the following methods to solve this problem:
  
1. If you have installed LILO on the primary boot partition, start Linux with a boot floppy disk and write the following in the boot: line:
  
Boot: mount root =/dev/hd_your_root_dev
  
Then execute/sbin/lilo and create LILO again in the master boot area.
  
2. Start Linux with the installation CD, select the upgrade System option, and re-establish LILO.
  
   Q:After I installed Red Hat 5.1, I found that the sound card could not work properly. How can I make sound card work?
  
A: This is probably because the Linux kernel cannot detect your sound card. You need to reinstall the driver of this sound card. In Red Hat Linux, you can use sndconfig to configure a sound card. The procedure is as follows:
  
1. log on to the system as the root user and run/usr/sbin/sndconfig;
  
2. Select your sound card type from the sound card selection list and set the IO address and IRQ interrupt Number of the sound card;
  
3. Click OK to complete the settings.
  
If you cannot find your sound card type in the Kernel configuration, we recommend that you use the ALSA sound card driver package to install the sound card. ALSA, short for Advanced Linux Sound Architecture, is a universal PCI Sound Card solution software compliant with GPL copyrights. It is used to drive sound card devices in Linux and supports most popular sound cards. ALSA is in RPM and Tar format and can be downloaded to the http://www.alsa-project.org for installation.
  
   Q:After using GPM in Slackware 3.5, I found that the mouse does not work in X-Window. Why is this problem? How can this problem be solved?
  
A: Actually, this problem occurs on the R option of Slackeare 3.5 GPM. With this option, GPM becomes a mouse forwarder, which creates a named pipe "/dev/gpmdata" and simulates the physical mouse into a MouseSystem. If the mouse does not work in X-Window, remove the-R parameter of GPM.
  
   Q:My system was originally installed with Windows Me, because I want to learn Linux and install Red Hat. However, after Linux is installed, the boot prompt will appear every time the system is started, and then enter Linux. How can I modify it to enable the system to enter Windows every time it is started?
  
A: After Red Hat is installed, it automatically uses Linux as the default Operating System. If you want to access Windows every time, you need to change Windows to the default Operating System. The specific method is to modify the file "/etc/lilo. conf" (LILO configuration file), put the relevant DOS Startup part in front, and then run LILO again.
  
Boot =/dev/hda
Map =/boot/map
Install =/boot. B
Prompt
Timeout = 50
Image =/boot/vmlinuz-2.0.34-1
Label = linux
Root =/dev/hdc2
Read-only
Other =/dev/hda1
Label = dos
Table =/dev/hda
  
The above code line indicates that the system starts Linux first. If you change the startup sequence:
  
Boot =/dev/hda
Map =/boot/map
Install =/boot. B
Prompt
Timeout = 50
Other =/dev/hda1
Label = dos
Table =/dev/hda
Image =/boot/vmlinuz-2.0.34-1
Label = linux
Root =/dev/hdc2
Read-only
  
In this way, the system starts Windows first each time it starts. In addition, you can add Default = dos to the configuration file of lilo. conf to enable the system to start Windows first.
  
   Q:In Linux, how does one restore deleted files? How to avoid accidental deletion?
  
A: to restore a deleted file by mistake, one solution is to use MC (Midnight Commander ). It has an Undelete function to find the deleted I-node on the ext2 file system, but it cannot restore the file name.
  
We can set Tcsh to prevent the use of the rm command to delete files. Tcsh has a parameter set rmstar, Which is set in the. cshrc file. In the future, when you use the rm command to delete a file, the system will require confirmation to avoid accidental deletion.
  
   Q:I have a 10 MB/100 MB adaptive Nic. How can I set it to MB in Linux? My computer is now connected to a LAN. How do I install the second Nic?
  
A: Add the following in/etc/lilo. conf:
  
Ether = 0, 0, 0, 28, eth0
  
Set the NIC to 100 MB.
  
To reduce possible problems during startup, the Linux kernel usually does not automatically detect multiple NICs. In this case, you can install the second Nic on your computer by using the netconf Configuration tool in Linux. In netconf, select the second Nic and the device name is eth1. Then, select the driver module, enter the I/O address and IRQ interrupt number, and run "etc/rc" after the disk is saved and exited. d/init. d/network restart.
  
Another method is to configure the conf. modules file. If the driver of the second Nic has been compiled into the kernel during installation, you only need to specify the parameter information of each Nic in the/etc/lilo. conf file. If the driver of the second Nic is not compiled into the kernel yet, but is loaded into the system dynamically as a module, configure it in the conf. modules file. For example:
  
Alias eth0 ne
Alias eth1 ne
Options ne io = 0x260, 0 x
  
The preceding figure shows two NE 2000 NICs, whose I/O addresses are 0x240 and 0x260 respectively. In this way, you can install two NICs in a system.
  
   Q:How to use a printer in Linux?
  
A: In a Linux system, printing is not directly sent to a printer. Instead, printing files are processed offline to save system time. Each printer in Linux has its own spool area. The printed content is first processed as a printed file and then stored in the spool area queue for printing.
  
Printer settings in Linux are stored in the setting file "/etc/printcap". When setting the printer, log on to the system as root. For example, add the following command in "/etc/printcap" to use the printer.
  
Lp0: sd =/var/spool/lpd/lp0: mx #0: sh: lp =/dev/lp0 :: if =/var/spool/lpd/lp0/filter:
  
   Q:How can I Uninstall a previously installed Linux?
  
A: To detach a Linux instance from the system, you need to delete the Linux partition and the Linux Startup module LILO.
  
Because the DOS and Windows Fdisk commands cannot identify the Linux partition type, you must use the Linux installation disk to reinstall it. In the partition step, delete the partition and exit, you can also use software that specifically deletes Linux partitions to complete the operation. To delete the Linux Startup module LILO, you can use the Windows Fdisk command. The command format is as follows:
  
FDISK/MBR.
  
   Q:I have a USB disk. Can I use it in Linux? How to use it?
  
A: To use USB disks in Linux, you must first create a sub-directory under/mnt:
  
Mkdir usb
  
Connect the USB disk to the computer and mount it with mount:
  
Mount/dev/sda/mnt/usb
  
In this way, the USB disk can be used. After the usb disk is used, you need to use umount/mnt/usb to unmount the usb disk.
  
   Q:Now I often see the word Samba in some articles. What is Samba?
  
A: Samba is an application based on the SMB protocol. SMB is a communication protocol that enables file sharing and printer sharing services on computers running Windows NT, Windows 95, and Windows for Workgroups. After Samba is used, the Linux computer "Network Neighbor" looks like a Windows computer. Windows users can log on to the Linux computer, and the Linux computer can also obtain data from Windows. Samba is the most effective tool for communication between different systems in LAN with a large number of Windows systems.
  
The Samba server consists of smbd and nmbd. Smbd is the core of Samba and is used to establish conversations, verify customers, provide file systems, and print services. nmbd enables Samba servers to be displayed in Windows "Network neighbors, allows users to browse available resources, and nmbd can also be used as a WINS (Windows Internet Name Service) server in the network.

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.