debian入门(切换root用户,更改网卡配置,及更新apt源配置)
作者:互联网
1、由于debian10系统最小化安装时,有很多命令是没有的,包括sudo命令,这时需要使用su命令切换到到root账户。
2、debian10更改网卡及DNS配置
网卡配置更改
#网卡配置 vim /etc/network/interfaces #网卡配置文件如下: allow-hotplug ens33 iface ens33 inet static address 10.0.0.200 netmask 255.255.255.0 gateway 10.0.0.2 #DNS配置 vim /etc/resolv.conf #DNS配置文件如下: domain localdomain search localdomain nameserver 180.76.76.76 nameserver 114.114.114.114
#重启网卡
systemctl restart networking.service
3、debian10换源
#进入安装源文件 vim /etc/apt/sources.list #将原有的官方源注释掉,加入下面的源 deb http://mirrors.aliyun.com/debian/ buster main non-free contrib deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib deb http://mirrors.aliyun.com/debian-security buster/updates main deb-src http://mirrors.aliyun.com/debian-security buster/updates main deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib #更新 apt update
标签:http,buster,mirrors,apt,网卡,deb,main,root,debian 来源: https://www.cnblogs.com/nj-duzi/p/14833633.html