Today we're going to update the Linux introductory course at the same time. Before, I have been studying Linux for a while, but the research is not very thorough. Here is the Linux video of Mogao network, which is just in WeChat's official account. It just started learning.
The whole video is based on CentOS 7. In order to be consistent with the video course, I use VirtualBox to install. Although my parallel desktop is also available under Mac OS, it is consistent with the course.
In this case, Linux is installed with Minimum, only in the form of command line.
In addition, because I use the Mac OS system, XShell command-line software is not supported. Here, after my attempt, I find an excellent domestic software FinalShell that can achieve almost the same functions as XShell, and can replace XShell in the Mac OS System for operation. Strong Amway.
The main SSH operation process of the following courses is written directly below:
Successful connection
Last login: Mon Apr 16 06:56:30 2018
[root@localhost ~]# ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.114 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::a7cc:ad45:300c:bbfe prefixlen 64 scopeid 0x20<link>
ether 08:00:27:9d:62:ed txqueuelen 1000 (Ethernet)
RX packets 887 bytes 77760 (75.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 783 bytes 103340 (100.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 4 bytes 340 (340.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4 bytes 340 (340.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@localhost ~]# ifconfig
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.114 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::a7cc:ad45:300c:bbfe prefixlen 64 scopeid 0x20<link>
ether 08:00:27:9d:62:ed txqueuelen 1000 (Ethernet)
RX packets 2077 bytes 167670 (163.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1837 bytes 229744 (224.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 4 bytes 340 (340.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4 bytes 340 (340.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[root@localhost ~]# wget
-bash: wget: Command not found
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# yum install wget
Plug in loaded: fastestmirror
Loading mirror speeds from cached hostfile
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
To enable Red Hat Subscription Management repositories:
subscription-manager repos --enable <repo>
To enable custom repositories:
yum-config-manager --enable <repo>
[root@localhost ~]# yum install wget
Plug in loaded: fastestmirror
Loading mirror speeds from cached hostfile
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
To enable Red Hat Subscription Management repositories:
subscription-manager repos --enable <repo>
To enable custom repositories:
yum-config-manager --enable <repo>
[root@localhost ~]# wget
-bash: wget: Command not found
[root@localhost ~]# wget
-bash: wget: Command not found
[root@localhost ~]# yum install wget
Plug in loaded: fastestmirror
Loading mirror speeds from cached hostfile
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
To enable Red Hat Subscription Management repositories:
subscription-manager repos --enable <repo>
To enable custom repositories:
yum-config-manager --enable <repo>
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
mv: Unable to obtain"/etc/yum.repos.d/CentOS-Base.repo" File status for(stat): There is no file or directory
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo.backup /etc/yum.repos.d/CentOS-Base.repo
[root@localhost ~]# yum install wget
Plug in loaded: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving dependencies
--> Checking transactions
---> software package wget.x86_64.0.1.14-15.el7_4.1 Will be installed
--> Resolve dependency complete
Dependency resolution
========================================================================================
Package Framework Edition source Size
========================================================================================
Installing:
wget x86_64 1.14-15.el7_4.1 updates 547 k
Transaction summary
========================================================================================
install 1 software package
Total downloads:547 k
Installation size:2.0 M
Is this ok [y/d/N]: y
Downloading packages:
wget-1.14-15.el7_4.1.x86_64.rpm | 547 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : wget-1.14-15.el7_4.1.x86_64 1/1
Verification : wget-1.14-15.el7_4.1.x86_64 1/1
already installed:
wget.x86_64 0:1.14-15.el7_4.1
Complete!
[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
--2018-04-16 07:10:33-- http://mirrors.163.com/.help/CentOS7-Base-163.repo
Resolving host mirrors.163.com (mirrors.163.com)... 59.111.0.251
on connection mirrors.163.com (mirrors.163.com)|59.111.0.251|:80... Connected.
Already issued HTTP Request, waiting for response... 200 OK
Length:1572 (1.5K) [application/octet-stream]
Saving to: "CentOS7-Base-163.repo"
100%[==============================================>] 1,572 --.-K/s Use time 0s
2018-04-16 07:10:33 (208 MB/s) - Saved“ CentOS7-Base-163.repo" [1572/1572])
[root@localhost yum.repos.d]# yum clean all
Plug in loaded: fastestmirror
Cleaning up software sources: base extras updates
Cleaning up everything
Cleaning up list of fastest mirrors
[root@localhost yum.repos.d]# yum makecache
Plug in loaded: fastestmirror
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/12): base/7/x86_64/group_gz | 156 kB 00:00:00
(2/12): base/7/x86_64/primary_db | 5.7 MB 00:00:00
(3/12): base/7/x86_64/filelists_db | 6.7 MB 00:00:00
(4/12): base/7/x86_64/other_db | 2.5 MB 00:00:00
(5/12): extras/7/x86_64/filelists_db | 709 kB 00:00:00
(6/12): extras/7/x86_64/primary_db | 185 kB 00:00:00
(7/12): extras/7/x86_64/other_db | 121 kB 00:00:00
(8/12): updates/7/x86_64/prestodelta | 960 kB 00:00:00
(9/12): updates/7/x86_64/primary_db | 6.9 MB 00:00:00
(10/12): updates/7/x86_64/filelists_db | 4.2 MB 00:00:00
(11/12): updates/7/x86_64/other_db | 734 kB 00:00:00
(12/12): extras/7/x86_64/prestodelta | 129 kB 00:00:01
Determining fastest mirrors
Metadata cache established
[root@localhost yum.repos.d]# yum install vim
Plug in loaded: fastestmirror
Loading mirror speeds from cached hostfile
software package 2:vim-enhanced-7.4.160-2.el7.x86_64 Installed and up to date
No processing required
[root@localhost yum.repos.d]# yum install vim
Plug in loaded: fastestmirror
Loading mirror speeds from cached hostfile
software package 2:vim-enhanced-7.4.160-2.el7.x86_64 Installed and up to date
No processing required
[root@localhost yum.repos.d]# ls
CentOS7-Base-163.repo CentOS-Debuginfo.repo CentOS-Sources.repo
CentOS-Base.repo.backup CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo
[root@localhost yum.repos.d]# vim /etc/sysconfig/network-scripts/ifcfg-enp0s3
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]#
[root@localhost yum.repos.d]#