Linux Debian13安装后更换为国内镜像源,解决执行sudo命令提示用户名不在sudoers文件中问题

选择Linux Debian作为服务器操作系统和桌面操作系统最佳Linux的理由:

Linux Debian是面向程序员的最古老,最出色的Linux发行版之一,Linux Debian极度稳定性,更适合于作为服务器的操作系统,作为桌面操作系统也很出色,Linux Debian提供了具有.deb软件包管理兼容性的超稳定发行版,Linux Debian是开发人员友好的操作系统 ,对于系统管理员和高级程序员而言,Linux Debian是最好的选择。

Debian更适合于作为服务器的操作系统,它比Ubuntu要稳定得多。Debian整个系统基础核心非常小,不仅稳定,而且占用硬盘空间小,占用内存小。128M的VPS即可以流畅运行Debian,而Ubuntu则会略显吃力。

Linux Debian下载地址:

Debian官网:

bash 复制代码
https://www.debian.org/

阿里云镜像站:

bash 复制代码
https://mirrors.aliyun.com/debian-cd/

华为开源镜像站:

bash 复制代码
https://mirrors.huaweicloud.com/debian-cd/

Lnux Debian13安装后需要进行一些配置。

1.Linux Debian13切换root用户方法

输入su命令后再输入root密码

bash 复制代码
su

2.解决用户名不在sudoers文件中

出现这个提示,就是这个用户没法得到超级用户权限。怎么办?变成超级用户:

2.1切换到root用户

bash 复制代码
su

2.2编辑/etc/sudoers文件,添加用户名 ALL=(ALL:ALL) ALL

bash 复制代码
vi  /etc/sudoers

在root ALL=(ALL:ALL) ALL下面添加:

bash 复制代码
用户名 ALL=(ALL:ALL) ALL

3.Linux Debian13镜像更新为国内镜像源

3.1切换到root用户

bash 复制代码
su

3.2备份当前镜像源文件

bash 复制代码
cp /etc/apt/sources.list /etc/apt/sources.list.bak

3.3编辑/etc/apt/sources.list文件

bash 复制代码
vi  /etc/apt/sources.list

替换为国内镜像源站
阿里云镜像站

bash 复制代码
deb https://mirrors.aliyun.com/debian/ trixie main contrib non-free non-free-firmware
deb-src https://mirrors.aliyun.com/debian/ trixie main contrib non-free non-free-firmware

deb https://mirrors.aliyun.com/debian-security/ trixie-security main contrib non-free non-free-firmware
deb-src https://mirrors.aliyun.com/debian-security/ trixie-security main contrib non-free non-free-firmware

deb https://mirrors.aliyun.com/debian/ trixie-updates main contrib non-free non-free-firmware
deb-src https://mirrors.aliyun.com/debian/ trixie-updates main contrib non-free non-free-firmware

deb https://mirrors.aliyun.com/debian/ trixie-backports main contrib non-free non-free-firmware
deb-src https://mirrors.aliyun.com/debian/ trixie-backports main contrib non-free non-free-firmware

3.4运行命令升级

bash 复制代码
apt  update    #取回更新的软件包列表信息
bash 复制代码
apt  upgrade   #进行一次升级
bash 复制代码
apt  clean   #删除所有已下载的包文件

相关推荐
tntxia21 小时前
linux curl命令详解_curl详解
linux
扛枪的书生1 天前
Linux 网络管理器用法速查
linux
顺风尿一寸1 天前
Java Socket 内核之旅:从 SocketChannel.read() 到 tcp_recvmsg 与 epoll 的完整调用链路
linux
XIAOHEZIcode1 天前
Ubuntu 终端美化全栈指南:Bash 到 Kitty 踩坑实录
linux·ubuntu·命令行
唐青枫1 天前
别再只会用 cron:Linux systemd Timer 定时任务实战详解
linux
AlfredZhao3 天前
生产环境里,为什么不建议把普通端口直接暴露到公网?
linux·https·443·80
戴为沐4 天前
Linux内存扩容指南
linux
zylyehuo5 天前
Linux 彻底且安全地删除文件
linux
用户805533698035 天前
主线 U-Boot 上 RK3506:和闭源 rkbin 拔河的三个隐性契约
linux·嵌入式
用户034095297915 天前
linux fcitx 5 雾凇拼音 设置在中文输入法下仍然输入英文标点
linux