问题集锦
Linux上传下载工具rz、sz
# yum install –y lrzsz
# rz #导入文件
#sz #导出文件
1.虚拟机yum源问题
[root@centos ~]# yum install -y openssh-clients
Loaded plugins: fastestmirror, security
Determining fastest mirrors
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
解决方法;
[root@centos ~]# cd /etc/yum.repos.d/
[root@centos yum.repos.d]# ls
CentOS-Base.repo CentOS-Media.repo epel-6.repo epel-testing.repo
CentOS-Debuginfo.repo CentOS-Vault.repo epel.repo
[root@centos yum.repos.d]# mv epel.repo epel.repobak
[root@centos yum.repos.d]# yum list httpd
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.bit.edu.cn
* extras: mirror.bit.edu.cn
* updates: mirror.bit.edu.cn
base | 3.7 kB 00:00
base/primary_db | 4.7 MB 00:00
2.ubuntu命令
yum命令
root@shixisheng-test-1:~# apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
vim is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 57 not upgraded.
主机名命令
root@shixisheng-test-1:~# hostname
shixisheng-test-1
root@shixisheng-test-1:~# uname -n
shixisheng-test-1
主机名永久修改 /etc/hostname
转载于:https://blog.51cto.com/chengyanli/1846767