Linux (II)

Source: Internet
Author: User

 

 

I haven't written a blog for a long time. Today I'm a test friend, praising me for my good habits of writing a blog. I am so ashamed that I haven't updated my blog for a month. I resigned in March 20, joined the company in April 10, changed my city, and changed my job. Today's work is quite busy. Unlike the previous job, there is a relatively large amount of time for a variety of things, leisurely blog sorting. It seems that we will continue to work hard in the future. ^_^!

Remember a garden friend who said that people must stick to something when they are alive! This blog is not only for others, but also for yourself! Maybe N years later, when I look back on the path I 've been taking over the years, the money I 've earned will always be spent in addition to making money. Do you have any meaningful things to do. Maybe N years later, most of myArticleIt is useless. But at least there are footprints left by me. I remember a C-language guy who was proud to say that he had lived a very high life for himself over the past decade on his thirty-year-old birthday, it can be reflected from a trivial matter-He hasn't watched TV for ten years.

Return to the topic and continue to learn about Linux. The following things have been sorted out intermittently for a month. Not much content, but I found it!

 

 Attach a cd

 

If a CD is mounted and we do not want to view the content on the UI, what can we do through the command line? In fact, it is very simple, and the two commands are done. [Root @ localhost ~] #Mkdir/Mnt/CDROMCreate a directory to store the content of the mounted CD   [Root @ localhost ~] #Mount /Dev/CDROM/mnt/CDROMMount the content of the CD (/dev/CDROM) to the/mnt/CDROM directory. [Root @ localhost ~] #CD/mnt/CDROMEnter the Directory [Root @ localhost ~] #LsView all files on the CD Centos headers notes RPM-GPG-KEY. Centosdocs-man.css images RELEASE-NOTES-en.html RPM-GPG-KEY-centos4 GPL isolinux repodata yumgroups. xml

 

RPM package management

An example of an RPM package: Sudo-1.7.2pl-5.el5. 5. EL5. rpm This includes the software name (SUDO), version number (1.7.2pl), Release number (5. EL5), and hardware platform (5. EL5)   Installation: [Root @ localhost ~] #Rpm-IVH sudo-1.7.2pl-5.el5. 5. EL5. rpm
 
-IInstall one or more selected software packages
 
-HUse "#" to display the progress of completion
 
-QQuery the software package system or one or more selected software packages-e delete all selected one or more software packages-u upgrade one installed software package to the new version-V verify that it is installed or one or more selected software packages
[Root @ localhost ~] #Rpm-IVH sudoCheck whether the sudo software package is installed.   Other options: -- Excludedocs Do not install document files in the Software Package -- Prefix path Install the software package to the path specified by path -- Test Test the installation only, but not install it. -- Replacepkgs Overwrite the installation. If we accidentally delete some software in the installation package, this parameter is very useful. -U You can upgrade the software by adding an uppercase u to the parameter. [Root @ localhost ~] # Rpm-uvh sudo-1.7.2pl-5.el5. 5. EL5. rpm   Uninstall: NOTE: If other software packages are dependent on each other, a prompt message is displayed during uninstallation. You can use -- nodeps to forcibly uninstall the software. [Root @ localhost ~] #Rpm-e -- nodeps sudoHowever, it is generally not recommended that you uninstall the dependent Software Package first.

 

Yum package management

Benefits of using yum   @ Automatically resolve the dependency of the software package @ Convenient software package upgrade   First, make sure that you can connect to the Internet. Of course, you can also set up a yum repository on the LAN, but it doesn't make much sense. If this is installed on your Linux system, your installation software will become very simple. Add the MySQL database you want to install [Root @ localhost ~] #Yum install MySQLAutomatically help us download and install MySQL   Yum related operations: Install Yum install Yum check-update detection and upgrade Yum update upgrade Yum list Software Package Query Yum info package information Yum remove uninstall Yum-help Man Yum help

 

PS:

I started to play deep Linux, at least from the interface, not like ylmf OS, which is similar to Windows. Of course, it is the interface. Below the command, I don't have such a high level, watch the video (Linux video tutorial). In fact, the content I have organized is the content of the video tutorial "lamp brothers-Linux" on the donkey. If you are interested, you can download it. I personally think it is good. Deep Linux is developed based on Ubuntu. I do not comment on Chinese products, so it is easy to find and spray. Haha! Two minor problems are encountered during use. Post the problem. Other Linux may also encounter similar problems.

 

 

 

By default, deep logon is performed by common users. To use root logon, you need to add a root password.

 

How to Set the root user
Fnngj @ fnngj-Virtual-machine:/$ Sudo passwd Root
[Sudo] password for fnngj:
Enter a new Unix Password:
Re-enter the new Unix Password:
Passwd: the password is successfully updated.
Fnngj @ fnngj-Virtual-machine:/$ Su -- root
Password:

I want to upload some files to the depth below, but I cannot connect to them all the time. Generally, the SSH service is installed by default in Linux. Is there any depth. However, the installation is very simple, and a command is required.
Install the SSH service
Root @ fnngj-Virtual-machine:/etc/init. d #Sshd start
Program"Sshd" is not installed yet. You can use the following command to install:
Apt-Get install OpenSSH-Server
Root @ fnngj-Virtual-machine:/etc/init. d #Apt-Get install OpenSSH-Server

Check whether the SSH service is enabled
Root @ fnngj-Virtual-machine:/etc/init. d #Netstat-nap | grep-I sshd
TCP 0 0 0.0.0.0: 22 0.0.0.0: * Listen 3315/sshd
Tcp6 0 0: 22: * Listen 3315/sshd

 

 

 

Finally, I would like to say that the font in Linux looks really comfortable. Hey!

 

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.