Linux Tutorial III

Source: Internet
Author: User

Intermediary transaction ">seo diagnose Taobao guest cloud host technology Hall

I believe that a lot of beginners who want to learn Linux are worried about what to look at Linux learning Tutorials Good, the following small series for everyone to collect and organize some of the more important tutorials for everyone to learn, if you want to learn more words, can go to wdlinux school to find more tutorials.

1, linux system software installation Yum

There are two main types of packages installed


Represents package packaging and installation methods for two Linux branches

The principle is roughly the same

Are compiled based on different platforms, versions, and then packaged with the binaries and some additional files.

This installation is quick and convenient

Or you can simply understand

RPM is a software management tool, such as compiling, packaging, installing, uninstalling, querying, etc.

Yum is a software package management tool and is an RPM based package

What difference or difference does it have?

RPM is compiled, packaged, all for a software or package, that is, can only operate a package, such as packaging, installation, uninstall and so on

Also because it is for different platforms, version packaging, so, many times, there will be lazy relationship

What is a lazy relationship? is to install the software, you need to install another software or a software library files, etc.

If you encounter this lazy relationship, the RPM installation will be error and failure, can not continue to install, so the package installation, sometimes very annoying

Maybe that's why Yum is so popular.

It can solve these lazy relationship problems, the need to use the software or library, will automatically search and install, unless this package

In this way, you can solve the problem of the Yum of the RPM installation package, as long as the software we want to install can be, other problems will help us solve

Now, you should understand or understand the difference between the two.

2, Linux system hard disk partition tool Fdisk

Fdisk is a Linux hard disk partition tool hard disk partitioning principle, but the tool format, etc. are different, one is in the system when the partition, one is installed after the system partition

Install the system partition, after the system is generally unable to modify or adjust, in the installation of the system is not partitioned hard disk space, installed system can be operated or partitioned loading

The main point here is that the operation of an unpartitioned free hard drive or a new hard drive

Here will be used to Fdisk, but this can only be within 2T of hard disk operation, greater than 2T, you can not use, have to use another parted tool

Also, Linux's understanding of hard drives is

/DEV/HD|SD (A|B|XXX) in this way

HD is primarily for the IDE's hard drive, which has rarely been seen

Most of them are in the beginning of the SD, including STATA,SAS,SCSI and other interfaces such as

HDA is the first hard drive

HDB is the second hard drive.

SDA is the first hard drive

SDB is the second hard drive.

The order here, but also related to a factor, that is, interface sequence or jumper, you should know that the hard drive interface is a jumper or something, that is, a master hard drive, etc.

Here's how to use Fdisk

Fdisk-l is a list of all the hard drives, as follows

[ROOT@HNWT ~]# Fdisk-l

disk/dev/sda:320.0 GB, 320071851520 bytes

255 heads, Sectors/track, 38913 cylinders

Units = Cylinders of 16065 * 8225280 bytes

Device Boot Start End Blocks Id System

/DEV/SDA1 * 1 104391 Linux

/dev/sda2 38913 312464250 8e Linux LVM

FDISK/DEV/SDA indicates that the operation of the hard drive, after running this will enter the interactive state of Fdisk, as follows


The number of cylinders for this disk is set to 38913.

There is no wrong with then, but this is larger than 1024,

And could in certain setups incorporated problems with:

1 software that setupcl in boot time (e.g., old versions of LILO)

2) booting and partitioning software from the other OSs

(e.g., DOS fdisk, powering fdisk)

Command (M for help):

Prompts you here, press M will prompt a help, such as

Command (M for help): M

Command Action

A toggle a bootable flag

b Edit BSD Disklabel

C Toggle the DOS compatibility flag

d Delete a partition partition

L list known partition types lists all of the supported partition types

The M Print this menu displays the menus

n Add a new partition additional partition

o Create a new empty DOS partition table

P Print the partition table displays partition information

Q Quit without saving changes exit not save

s create a new empty Sun Disklabel

t change a partition ' s system ID changes partition type

U Change display/entry units

V Verify the partition table

W Write table to disk and exit writes the partition table and exits

X Extra functionality (experts only)

Command (M for help):

All the parameters are listed here.

Depending on the prompts above, you can continue with the following simple instructions

New Plus Zoning

1 Press N New plus

2 Select Primary partition/Extended partition

3 starting value, the default carriage return can

4 Partition Size value


Delete Partition

1 Press D

2 Select the appropriate partition number, enter the

Change Partition type

1 Press T

2 Select partition

3 Select partition type (press L to list all partitions and IDS)

Linux is primarily a swap partition where you need to operate

The general operation, like on the three

At the end of all operations, also ensure that the correct, you can press the W Save and exit

If the operation is incorrect, press Q to exit directly

Above the operation, do not online environment/production environment test, or the consequences of the ego

For testing machines or virtual machines, you can do more than a few times, practice makes perfect

3, Linux system restart/shutdown command finishing

Reboot command:

1, reboot

2. shutdown-r now reboot (root user)

3, Shutdown-r 10 over 10 minutes automatic restart (root user use)

4, Shutdown-r 20:35 reboot at 20:35 time (root user)

If you set the reboot through the shutdown command, you can cancel the reboot with the SHUTDOWN-C command

Shutdown command:

1, halt immediately shut down

2, Poweroff immediately shut down

3. shutdown-h now shutdown (root user)

4, shutdown-h 10 10 minutes after automatic shutdown

If you are setting the shutdown via the shutdown command, you can cancel the reboot with the SHUTDOWN-C command

This tutorial is excerpted from Wdlinux forum, Welcome to Reprint ~

Related reading:

One of the Linux tutorials

Linux Tutorial II

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: 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.