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

相关推荐
米高梅狮子1 小时前
03.网络类服务实践
linux·运维·服务器·网络·kubernetes·centos·openstack
June`1 小时前
网络编程时内核究竟做了什么???
linux·服务器·网络
原来是猿1 小时前
腾讯云服务器端口开放完全指南
服务器·网络·腾讯云
你的保护色2 小时前
【无标题】
java·服务器·网络
楼兰公子2 小时前
RK3588 + Linux7.0.3 网络工程调试错误速查手册
linux·网络·3588
Elnaij2 小时前
Linux系统与系统编程(9)——自设计shell与基础IO
linux·服务器
IMPYLH2 小时前
Linux 的 unexpand 命令
linux·运维·服务器·bash
想唱rap3 小时前
IO多路转接之poll
服务器·开发语言·数据库·c++
|_⊙3 小时前
Linux 文件知识 补充
linux·运维·服务器
落羽的落羽4 小时前
【算法札记】练习 | Week4
linux·服务器·数据结构·c++·人工智能·算法·动态规划