Linux Tutorial II

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, forget the MySQL root password recovery method

MySQL is too long, sometimes forget the password, but do not worry, there are ways to restore or modify the

First stop MySQL

Service Mysqld Stop

And then use the next way to start

/www/wdlinux/mysql/bin/mysqld_safe--skip-grant-tables &

And then go to MySQL and execute the following statement


No password, direct return

And then execute

mysql> use MySQL;

mysql> Update user Set Password=password ("") where user= "root";

Change the to the appropriate password

mysql> flush Privileges;


Modification complete

Stop MySQL Running

Killall-9 Mysyqld

The normal way to start mysqld, such as

Service mysqld Start


2, the system to set up the IP address setup when the solution can not be set

There are several ways to set IP addresses in Linux

1 You can directly edit the configuration file, generally in/etc/sysconfig/network-scripts/ifcfg-ethx (permanently saved)

2 can use ifconfig command (temporary use)

3 can also use the setup of this menu tool (permanent Save)

For the top two relative demand highs, that is, to be more familiar with Linux

But using the Setup tool is relatively simple, because it is a menu tool, can also adapt to more beginners

However, there are times when you can run Setup without network settings, and you cannot set IP, because you do not have the associated module command to install network settings, so

If you can connect the net machine, as long as the Yum can be used, as follows

Yum install-y system-config-network System-config-network-tui

After this installation, you can use and set the

If you encounter an even run Setup prompts the command to not be found, it is because the Setup Toolkit is not installed, and for some minimal installations, this is often the case


Yum install-y Setup Setuptool

It's okay.

3, Linux Zip package compression and decompression

Linux Zip command detailed function Description: Compressed file. Syntax: Zip [-acddffghjjkllmoqrstuvvwxyz$][-b < working directory >][-ll][-n < word tail string >][-t < date time >][-< compression efficiency >][Compressed files [Document] [-i < template style] [-x < template style]

Supplemental Note: Zip is a widely used compression program, which is compressed to produce a compressed file with a ". zip" extension. Parameters:

-A adjusts the executable automatic decompression file.

-b< working directory > Specifies the directory where files are temporarily stored.

-C adds a comment for each compressed file.

-d deletes the specified file from the compressed file.

The directory name is not established in the-D compressed file.

-F The effect of this parameter is similar to the specified "-u" parameter, but not only the existing file is updated, but if some files do not exist in the compressed file, this parameter will be added to the compressed file together.

-F attempts to repair a corrupted compressed file.

-G compresses the file and attaches it to the existing compressed file instead of creating a new compressed file.

-H online Help.

-i< template Style > compress only the eligible files.

J only saves the file name and its contents, without any directory names.

J Delete unnecessary data before compressing the file.

-K uses a file name in MS-DOS-compliant format.

-L replaces the LF character with the LF+CR character when compressing the file.

-ll compress the file, replace the LF+CR character with the LF character.

-L displays copyright information.

-M to compress the file and add the compressed file, delete the original file, that is, move the file to the compressed file.

-n< string > Do not compress files with a specific character end string.

-O Sets the time to change the compressed file to the same file as the file with the latest change time in the compressed file.

-Q does not display the instruction execution process.

-R recursively processes all files and subdirectories in the specified directory.

-S contains system and hidden files.

-t< Date Time > Set the date of the compressed file to the specified date.

-T checks that each file in the backup file is correct.

-U replaces newer files into compressed files.

-V Displays the instruction execution process or display version information.

-V Saves the file properties of the VMS operating system.

-W in the file name if the version number, this parameter is only valid under the VMS operating system.

-x< template style > exclude eligible files when compacting.

-X does not save additional file attributes.

-Y saves the symbolic connection directly, not the file that the connection points to, and this parameter is valid only for systems such as UNIX.

-Z Adds a comment for the compressed file.

-$ the volume name of the disk on which the first compressed file is stored.

-< compression Efficiency > Compression efficiency is a value between 1-9.

Linux Unzip command detailed

Function Description: Extract zip file

Syntax: Unzip [-cflptuvz][-agcjlmnoqsvx][-p < password >][.zip file] [file][-d < directory >][-x < file] or unzip [-z]

Supplemental Note: Unzip is a decompression program for. zip compressed files.


-C Displays the uncompressed results to the screen and converts the characters appropriately.

-F to update existing files.

-L Displays the files contained within the compressed file.

-P, similar to the-c parameter, displays the uncompressed results to the screen, but does not perform any transformations.

-T check that the compressed file is correct.

-U is similar to the-f parameter, but in addition to updating an existing file, the other files in the compressed file are uncompressed to the directory.

-V displays detailed information when executed.

-Z Displays only the memo text for the compressed file.

-A makes the necessary character conversions to the text file.

-B Do not convert text files to characters.

The file name in the-C compressed file is case-sensitive.

J does not handle the directory path in the compressed file.

-L Change all file names in the compressed file to lowercase.

-M sends output to more program processing.

-N uncompressed does not overwrite the original file.

-O does not need to ask the user first, overwriting the original file after unzip execution.

-p< Password > Use zip password option.

-Q does not display any information at execution time.

-S converts the whitespace character in the file name to the bottom line character.

-V preserves file version information for VMS.

-X to restore the original GID of the file while decompressing.

[. zip file] Specifies a. zip compressed file.

[file] Specifies which files in the. zip compressed file to process.

-d< directory > Specifies the directory to store after the file is uncompressed.

-x< file > Specify which files in the. zip compressed file should not be processed.

-Z unzip-z equals execute zipinfo Instruction

This digest from Wdlinux Forum, welcome reprint ~

One of the Linux tutorials

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.