Linux Quick Start

Source: Internet
Author: User

Many beginners think that the Linux operating system is difficult to use. Now, we compare the basic operations in Linux with those in the DOS operating system as follows to get started as soon as possible.

[1. Preliminary knowledge]
1. [system installation]
During Linux installation, use the Tab, Arrow, space, and press ENTER keys to make the selection. Linux must be installed in a separate partition. To avoid registry and shortcut path errors in Windows, it is best to install it in the last partition of the hard disk. After the last partition is deleted, we recommend that you use Pqmagic to divide it into Linux Native (root partition) and Linux Swap (data exchange zone). If your hard disk is larger than 8 GB, your Linux root partition should be installed within the first 8 GB of linux root partition termination sector <1023 cylinder ). Native partitions are generally larger than 240 MB. The specific size depends on the installed Linux components. We recommend that you do not increase the size to 2 GB. The Swap partition must be 60 MB or more. Collect your hardware information, such as CPU, memory, display, graphics card, mouse, and keyboard, before installation. There are many Linux versions and they are constantly updated. installation can be completed smoothly as prompted.

2. [log in]
By default, after the installation is started, enter Linux or press enter after Lilo boot: appears.) Linux starts to start. When the logon prompt Login: appears, enter the user name, and then the password prompt password: enter the password. You can access the corresponding user environment. For example, enter "root" and "password" to enter the Super User Environment #. Enter another user name and password to enter the user environment $ of course, the version may vary by % ).

3. [shut down the system]
At the Super User prompt # Enter halt to shut down immediately) or shutdown [time] after a delay of time, the system will shut down and give each user a warning on how long it will take to shut down at intervals, the computer will perform a series of shutdown operations. When the System halt occurs, the power can be turned off. A non-superuser must use the exit command to exit the operating environment, and then use the superuser: root to log in before closing the operation.

4. [Notes]
Not exactly the same as DOS:

Command Line letters are case-insensitive. in Linux, the super user's system prompt is #. The general user's system prompt is $, and the general user's system prompt can be changed like DOS. *,? The meaning is the same as that in DOS. [] is a symbol that only contains parentheses. Continuous symbols can be replaced by symbols that start and end, for example, [12345678] can be replaced by [1-8]. [abcdefijk] can be represented by [a-fi-k.
Path separator/
Prompt> #, $
Wildcard *,? *,? , []

5. [file type]
Unlike DOS and Windows, in Linux, directories and devices are regarded as files. There are four types of files: (1) common files, which are commonly referred to as files, in the long-column directory mode, a "-" symbol is used before the beginning of the line. (2) Directory files, which we usually call a directory, are represented by a letter "d" before the beginning of the line in the long-column directory mode. (3) character device files, such as monitors, printers, and terminals, are represented by a letter "c" before the beginning of the line in the long-column directory mode. (4) block device files, such as hard disks, floppy disks, and discs, are represented by a letter "B" before the beginning of the line in the long-column directory mode. When Linux uses the long format column directory command ls-l, for example:

-Rwxrw-r -- 5 user group 1089 Nov 18 1998 filename
Access permission user group name number of bytes last modified time file name

In DOS, the file name is in the format of 8.3. After Windows 95, long file names are supported. In Linux, long file names are supported. In DOS, files with the extension "com", "exe", and "bat" can be executable files. However, in Linux, the file type can only be known through file attributes. The command "ls-F" can be used to distinguish between directories and files, "/" indicates a directory, and "*" indicates an executable file. You can use ls-aF to list all files and directories, including hidden files and directories, the file name is marked with the dot "..

6. [Read Permission]
In Linux, the file owner is called the owner, and other users are called the same group and others. To ensure the security of each user's file, Linux inherits the UNIX method, by setting access permissions, some users are restricted from random access to files. There are three levels of access permissions: read right r, write right w, and execution right x. There are a total of nine characters in the access permission in the order of owner, same group, and others. In the preceding example, the master has the read and write permissions on the file, the same group has the read and write permissions on the file, and others have only the read permission on the file.

7. [help]
In Linux, you only need to add man command in the command line to view the Help command), you can get online help for this command. Man has a set of its own commands, usually composed of a single key. Press the Space key and the F key to go to the next page, press the B key to go to the previous page, press the Q key to exit man, and return to the command line.

[2. File Management and directory operations]
1. [file management]

Function DOS Linux remarks
Show file content type, more cat, more type, cat are all displayed, more is displayed by PAGE
Copy cp
Move files and rename them to move mv
Delete Files del and erase rm
Print file print lpr

2. [directory operations]

Function DOS Linux remarks
Column directory and file dir/option ls-option in Linux cd/is to directly return the logon directory rather than the root directory
Display the current directory cd pwd
Change working directory cd/directory
Create the directory md and mkdir
Delete directory rd and rmdir
Change the directory name to move mv
Copy directory xcopy copy

It is said that many DOS commands are based on UNIX, and Linux is developed from UNIX, so the format of DOS and Linux commands is very similar, but the functions of Linux commands are more powerful, the options and parameters are quite different. You can use the help command when using them.

[3. Use of External Storage]
In Linux, you cannot directly access a floppy disk, other hard disk logical partitions, or optical disks. in Linux, they are regarded as files, before use, you must use the mount command to mount them to the/mnt directory of the system. After use, you must uninstall them. The command format is as follows:

Mount-t file system type device name mount directory

Common file types include:
Msdos partition File
Vfat supports dos partitions with long file names
Ext2 Linux File System
Swap Linux swap partition or swap file
File System for CD-ROM Installation
Hpfs OS/2 partition File System

Device name refers to the name of the device to be loaded, such as a floppy disk, hard disk, and optical disk. the floppy disk is generally/dev/fd0 fd1, and the hard disk is generally/dev/hda hdb, hard Disk logical partitioning generally lasts for hda1 hda2... And so on. The CD is generally/dev/hdc. Before loading, create an empty directory name under the/dev/mnt directory. For example, a floppy disk can be used for a floppy disk, and a hard disk partition can be used for its drive letters such as c and d, A cd-rom can be used as an example:

Mount an mddos-format floppy disk: mount-t msdos/dev/fd0/mnt/floppy
Mount a Linux-format floppy disk: mount-t ext2/dev/fd0/mnt/floppy
Mount a hard drive in Windows 98 format. Drive c): mount-t vfat/dev/hda1/mnt/c
Mount a cd: mount-t iso9660/dev/hdc/mnt/cd-rom

After the disk is loaded, you can perform operations on the directory. You must exit the directory before using a new floppy disk or a CD, and run the unmount command umount to detach the new disk and CD, otherwise, the system will not acknowledge that the disc cannot exit with the pop-up key in front of the optical drive panel before it is detached.


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.