FAQs for Linux beginners

Source: Internet
Author: User
I. how to create multiple users remind everyone not to use root users all the time, because root users have the highest power in the system and may damage the system accidentally. For example, if we want to delete the files in the/temp directory but accidentally convert the command to "rm/temp (a space is added after '/')", then it is very

1. how to create multiple users

We would like to remind you that you should not always use the root user because the root user has the highest power in the system and may damage the system accidentally. For example, if we want to delete the files in the/temp directory, but accidentally input the command "rm/temp (a space is added after )", it is very likely that all files under the root directory will be deleted. Moreover, "Linux is a real multi-task, multi-user system", but it is a pity that you do not understand the characteristics of Linux. To make it easier for you and others to use it, create several more users in Linux.

Enter "adduser newuser" and press Enter. The screen does not respond to the command. Is it wrong? No, in fact, the system has accepted new users. You should enter the command "passwd newuser", the screen will prompt you to enter the password, enter again to confirm, a new user will be added successfully, it is really simple. Log on right away and try it.

Linux provides six virtual consoles, with ALT + F1 ~ F6 switchover (use CRTL + ALT + F1 ~ in X-window ~ F6 switch), each console can use different users to log on and run different programs. Create a user for your family and friends.


II. how to use non-Linux partitions such as floppy disks, CDs, and DOS in Linux

This is the most frequently asked question for Linux beginners. Since everyone is used to Microsoft's access method, I always want to use a similar idea to find a floppy disk and a CD. However, in Linux, UNIX treats devices as files. To access a floppy disk and a CD, you must first load them to the/mnt Directory of the Linux system.

The mount command is in the following format: mount-t file system-type device name mount Directory

The file system type is the partition format. Linux supports many file system types:

Msdos partition file system type,
Vfat supports DOS partition files with long file names (which can be understood as Windows files) system types,
File system type,
Ext2 Linux file system type
......

Device name: the name of the device you want to load. The floppy disk is usually/dev/fd0 fd1. the disk is determined based on the position of your optical drive. the disk where the optical drive is usually mounted to the master disk of the second hard disk is/dev/hdc; if a DOS partition is accessed, the device names are listed. for example,/dev/hda1 indicates the first partition of the first hard disk. The Mount directory is the load point of the specified device.

1. Mount a floppy disk

First, use mkdir/mnt/floppy to create an empty floppy directory under the/mnt directory, then input mount-t msdos/dev/fd0/mnt/floppy to load a floppy disk in the DOS file format, you can find all the content of this floppy disk in the/mnt/floppy directory.

2. load the drive C of Windows

Mkdir/mnt/c create an empty c directory under the/mnt directory;

Mount-t vfat/dev/hda1/mnt/c: load the c drive in Windows to the/mnt/c directory in the format of long file names, in the future, you can read and write the content in the C root directory.

3. attach a CD

Mkdir/mnt/cdrom create an empty cdrom directory under the/mnt directory;

Mount-t iso9660/dev/hdc/mnt/cdrom to load the disc into the file system. the content of the disc will be found in the/mnt/cdrom directory. In some Linux versions, you can use the mount/dev/cdrom or mount/mnt/cdrom command to mount the disc.

Note that the mount command is used to mount a floppy disk or a CD, rather than a floppy disk or an optical drive. Some beginners may make a mistake, thinking that after using the above command, the soft drive will become/mnt/floppy, and the optical drive will become/mnt/cdrom, in fact, it is not, when you want to change a disk or a floppy disk, you must first detach it and then reload the new disk.

4. uninstall

Command format: umonut directory name. for example, to detach a floppy disk, enter the command umonut/mnt/floppy. Note that directly pressing the pop-up key on the optical drive panel does not work before you detach the disc.

 

3. how to install Linux application software

For common users, you can install or upgrade software by using Red Hat software package and management tool RPM. After use, you can easily install, upgrade, and uninstall software and query software information.

If you are installing Red Hat Linux, you can use RPM. if not, you can install RPM first. The method is as follows:

1. download RPM software package: ftp://ftp.redhat.com/pub/code/rpm/rpm-2.3.11.tar.gz

2. run the following commands in Linux:


Cd/
Tar xzvf rmp-2.3.11.tar.gz
Cd rpm-2.3.11
./Configure
Make
Make install
Mkdir/var/local/lib/rpm/var/lib/rpm
 


 
In this way, you have completed the RPM installation, and then you can find the RPM installation version of the software on the Internet or on the CD. Then install with RPM. the usage of RPM is simple:

1. install the software package with RPM: rpm-ivh software file name

For example, the rpm-ivh fvwm95-2.0.43a.chinese-1.i386.rpm screen will output the package name and the installation progress bar:

Fvwm95 ###############

When the progress bar goes to the end, the Chinese fvwm95 (an X-Window interface) will be installed, and then run X-Window. Ah, the Chinese fvwm95 will be in front of me.

2. reverse installation package with RPM: rpm-e software name

Example: rpm-e fvwm95

3. use the RPM upgrade package: rpm-Uvh software upgrade file name

For example: rpm-Uvh fvwm95-2.1.0a.chinese-1.i386.rpm, RPM automatically uninstalls the original Old version, upgrade software installed into the system. It's not hard!

4. how to view Linux files in Windows

By using the mount command, we can easily view and use Windows files in Linux. As the saying goes, we also hope to see Linux files in Windows. But Windows is not as friendly as Linux, and there is no tool for communicating with Linux. what should I do? Don't worry, there is a small tool on the network called Linuxdos, less than 500 K, running in Windows, dedicated to viewing Linux files. After running, you can select a drive and list the Linux file system just like the resource manager.

V. how to upgrade Linux

The Linux language is English, so the screen is full of "English Mouse", which is inconvenient to use. However, Chinese software engineers are talented enough to provide a comprehensive solution for the localization of Linux.

1. chdrv

First of all, you must enable Linux to display Chinese characters! Chdrv is a Chinese analog terminal under the command line. that is to say, if you install it, you can display and enter Chinese characters in the Linux Command Line State. After chdrv is started, a virtual terminal is created in tty7 (Ctrl + Alt + F7). after logging on to tty7, you can use the Chinese support provided by the virtual terminal. Tty1 to tty6 will not be affected.

If you can find the RPM installation package, you can easily use the RPM installation program to install it. Otherwise, you can go to ftp://ftp.ihep.ac.cn/pub/chinese/systemto obtain the chdrvbin-0.23.gb.tar.gzand chdrvfont.tar.gz compiled by chdrv. Then log on with root and execute the following commands in sequence:


Tar xvzf chdrvbin-0.23.gb.tar.gz \ decompress the compiled chdrv to the chdrv-0.23.gb Directory
Mv chdrvfont.tar.gz chdrv-0.23.gb/\ move the font file to the chdrv-0.23.gb Directory
Cd chdrv-0.23.gb \ go to this directory
./Installbin \ run the installation file
 

2. xcin

If you often use Linux in X-Window, try XCIN to solve the problem of Chinese input. XCIN is the abbreviation of Xwindow Chinese INput. it is a Chinese INput system running in X-Window mode. after it is installed, all terminals of X-Window will provide Chinese services.

You can. Then log on with root and execute the following commands in sequence:

Tar xzvf xcingb-2.2.tar.gz \ extract
Cd xcingb-2.2 \ go to Directory
./Configure \ modify installation options
Make \ compile
Make install \ installation
 


 
Similarly, if you can find the RPM installation version of the software, you can use RPM for installation.

So far, we have introduced how to use Chinese in command line and X-Window. However, in the text editing software, only Chinese characters can be displayed, but Chinese characters cannot be entered. To solve this problem, you must manually modify the following two points:

1) set different shell

If Bash Shell is used: add the following content in/etc/profile:

Stty cs8-istrip
Stty pass8
Export LANG = C
Export LC_CTYPE = iso-8859-1
 


 
If you use Tcsh Shell: add the following settings in/etc/csh. login or/etc/csh. cshrc:

Stty cs8-istrip
Stty pass8
Setenv LANG C
Setenv LC_CTYPE ISO-8859-1
 


 
2) add the following content to the. inputrc file in your home directory:

Set convert-meta off
Set output-meta on
 

3. Chinese window manager C-fvwm95

Fvwm95 is like a Linux English Win95. Linux users in China always expect to use Linux in a Chinese window one day. This desire is now a reality. Mr Yu Ming, from the computing center of the Institute of High Energy Physics of the Chinese Emy of Sciences, made fvwm95 a Chinese character. we can finally replace the nasty English characters on fvwm95 with Chinese characters!

You can download the fvwm95's source code from ftp.ihep.ac.cn/pub/chinese/packages. Its font can also be obtained in ftp.ihep.ac.cn/pub/chinese/fonts/pcf. Installation instructions are attached to the downloaded file. Because its configuration is still troublesome, it is best to find the appropriate RPM package.

4. download BluePoint Linux Star Preview (Blue Point Preview)

The Blue Point preview version is based on Red Hat and contains the Chinese kernel and the Chinese display/

Related Article

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.