问题 vim中文乱码 1 2 3 4 5 6 7 vim ~/.vimrc set fileencodings=utf-8,gb2312,gb18030,gbk,ucs-bom,cp936,latin1set enc=utf8set fencs=utf8,gbk,gb2312,gb18030
systemctl command not found systemctl: command not found
可以使用service代替 service语法有一点区别
1 2 systemctl start mysqld service mysqld start
centos8 设置代理 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 vim /etc/yum.conf vim /etc/wgetrc http_proxy = IP:PORT ftp_proxy = IP:PORT vim /etc/profile export http_proxy="http://child-prc.intel.com:913" export https_proxy="http://child-prc.intel.com:913" export ftp_proxy=$http_proxy
查找大文件 1 2 find / -type f -size +800M
没有初始化root
1 2 3 4 5 6 7 8 9 10 11 12 13 14 cd /etc/yum.repos.d/sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo yum clean all yum makecache yum install wget –y
no match for argument 在使用yum安装工具的时候,产生这个错误的原因是未配置yum源,解决方法是就安装yum源
1 yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
1 sudo yum install epel-release
Another app is currently holding the yum lock 可能是系统自动升级正在运行,yum在锁定状态中。
Ubuntu20.04 安装vim 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 sudo apt-get install vim cd /etc/vimsudo vim vimrc set number set history =1000 set autoindentset smartindent set tabstop=4 set shiftwidth=4 set showmatch
使用root用户登录系统 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 sudo passwd root ... sudo gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf greeter-show-manual-login=true allow-guest=false auth required pam_succeed_if.so user != root quiet_success sudo gedit /etc/pam.d/gdm-password auth required pam_succeed_if.so user != root quiet_success sudo gedit /root/.profile mesg n 2> /dev/null || true tty -s&&mesg n || true reboot
开启ssh 1 2 3 4 5 6 7 8 9 sudo apt update sudo apt install openssh-server sudo systemctl status ssh sudo ufw allow ssh
安装老网络工具 1 sudo apt-get install net-tools
apt代理 1 2 3 4 5 vim /etc/apt/apt.conf.d/proxy.conf Acquire::http::Proxy "http://10.211.55.2:7890" ;
问题 E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 5447 (unattended-upgr)