Ubuntu
Ubuntu
1.中文支持
# 编码配置
dpkg-reconfigure locales
# 设置LC_ALL变量
export LC_ALL="en_US.UTF-8"
2.Mirror
3.SSH
sudo apt install openssh-server
sudo systemctl status ssh
4.可选程序设置
ls /usr/bin/python*
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 2
sudo update-alternatives --config python
5.显示已安装软件
dpkg-l
6.版本更新
apt-get -u dist-upgrade 版本更新
7.完全删除软件,并且不保留配置文件
apt-get --purge remove apache
8.搜索软件列表中搜索字符串
apt-cache search string
9.配置时区
dpkg-reconfigure tzdata 配置时区
10.静态 IP
编辑 /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.50.129
gateway 192.168.50.1
netmask 255.255.255.0
dns-nameservers 8.8.8.8 8.8.4.4
auto eth0:0
iface eth0:0 inet static
address 192.168.50.156
gateway 192.168.50.1
netmask 255.255.255.0
dns-nameservers 8.8.8.8 8.8.4.4
重启服务
sudo systemctl restart networking