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   #删除所有已下载的包文件

相关推荐
又来敲代码了4 分钟前
k8s的部署
linux·运维·云原生·容器·kubernetes
忡黑梨16 分钟前
eNSP_路由策略
运维·服务器·网络·华为·智能路由器·负载均衡
日取其半万世不竭20 分钟前
PostgreSQL 云服务器安装配置指南:从零开始搭建生产数据库
服务器·数据库·postgresql
IT WorryFree28 分钟前
FGT-KVM 完整部署极简教程(CentOS 7 + KVM 环境)
linux·运维·centos
上海云盾安全满满30 分钟前
网站被攻击了,高防CDN相比与高防服务器有什么优点
运维·服务器
一袋米扛几楼9833 分钟前
【报错问题】彻底解决 TypeScript 报错 TS2769: No overload matches this call (JWT 篇)
linux·javascript·typescript
@encryption33 分钟前
计算机网络 --- NAT
运维·服务器·计算机网络
goyeer36 分钟前
【ITIL4】32服务实践 - 服务变更管理
linux·运维·服务器·数字化·价值·itil
扛枪的书生41 分钟前
Git 学习总结
linux
liuyao_xianhui44 分钟前
进程概念与进程状态_Linux
linux·运维·服务器·数据结构·c++·哈希算法·宽度优先