歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> 關於Linux

Ubuntu之配置

ubuntu首次配置:
配置apt源(deb -- dpkg):
apt-get源配置文件:
/etc/apt/sources.list

國內鏡像源:
mirrors.163.com
mirrors.aliyun.com

16.04 aliyun的ubuntu鏡像源設置:
把以下內容覆蓋/etc/apt/sources.list文件內容

deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

如果使用3.3.3.1服務器鏡像源:
在/etc/hosts追加以下內容:
3.3.3.1 mirrors.aliyun.com

更新鏡像源: sudo apt update
升級當前系統軟件: sudo apt upgrade
apt命令的用法:
sudo apt install vim
sudo apt remove vim

遇到沖突解決不了, 通過dpkg卸載包: dpkg -P

列出當前系統已安裝的包: sudo dpkg -l

==================================================
網絡配置文件:
臨時設置IP地址:
ifconfig enp0s25 3.3.3.9/24

ifconfig enp0s25 3.3.3.9 netmask 255.255.255.0

永久設置IP地址: /etc/network/interfaces
auto enp0s25
iface enp0s25 inet static
address 192.168.1.81
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 223.5.5.5 8.8.8.8

auto enp0s25:0
iface enp0s25 inet static
address 3.3.3.9
netmask 255.255.255.0

永久保存DNS:
sudo -i
echo 'nameserver 223.5.5.5' >> /etc/resolvconf/resolv.conf.d/base
resolvconf -u

==================================================
安裝軟件:
VIM: sudo apt install vim
五筆輸入法: sudo apt install fcitx-table-wbpy
NFS: sudo apt install nfs-kernel-server
sshd: sudo apt install openssh-server
tmux: sudo apt install tmux
git: sudo apt install git
播放器: sudo apt install smplayer

Copyright © Linux教程網 All Rights Reserved