Debian12安装后更换为国内镜像源,切换root用户,解决用户名不在sudoers文件中此事将被报告 您所在的位置:网站首页 root怎么改定位 Debian12安装后更换为国内镜像源,切换root用户,解决用户名不在sudoers文件中此事将被报告

Debian12安装后更换为国内镜像源,切换root用户,解决用户名不在sudoers文件中此事将被报告

2024-07-11 12:55| 来源: 网络整理| 查看: 265

选择Debian作为编程开发最佳Linux的理由: Debian是面向程序员的最古老,最出色的Linux发行版之一。Debian提供了具有.deb软件包管理兼容性的超稳定发行版。Debian为程序员提供了许多最新功能。因此,它具有一个特殊的编程空间。Debian是开发人员友好的操作系统。这些库是世界一流的,并且社区在不断发展,您可以使用apt-get和build-dep。对于系统管理员和高级程序员而言,Debian是最好的选择。

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

Debian下载地址:

Debian官网: https://www.debian.org/ 阿里云镜像站: https://mirrors.aliyun.com/debian-cd/ 华为云镜像站: https://mirrors.huaweicloud.com/debian-cd/

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

在这里插入图片描述

1.Debian12切换root用户方法 输入su命令后再输入root密码

su

在这里插入图片描述

2.解决用户名不在sudoers文件中此事将被报告问题 出现这个提示,就是这个用户没法得到超级用户权限。怎么办?变成超级用户: 2.1切换到root用户

su

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

vi /etc/sudoers

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

用户名 ALL=(ALL:ALL) ALL

3.Debian12镜像更新为国内镜像源 3.1切换到root用户

su

3.2备份当前镜像源

cp /etc/apt/sources.list /etc/apt/sources.list.bak

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

vi /etc/apt/sources.list

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

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

清华大学镜像站

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware

3.4运行命令生成缓存

apt-get clean - 删除所有已下载的包文件 apt-get update - 取回更新的软件包列表信息 apt-get upgrade - 进行一次升级

4.解决Debian12文件夹对话框、火狐浏览器、命令终端等没有最大化和最小化的问题 应用程序–搜索"优化"–启动–左侧点击窗口标题栏–右侧将最大化、最小化选项打开。 在这里插入图片描述



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有