Debian

文章目录


前言

Debian 系统在安装、配置及使用过程中可能出现的一系列问题及其相应的解决策略。
大标题的顺序不分先后


一、使用root用户操作

直接使用su命令进行切换。

二、配置用户使用sudo命令

在安装好系统之后,使用用户名登录之后。需要执行需要root权限的命令,会发现无法执行成功。原因是没有配置用户使用sudo的权限。

  1. 编辑bash /etc/sudoers文件
    可以先切换root用户安装好vim工具,或者直接使用vi工具编辑文件。
bash 复制代码
 vim /etc/sudoers
  1. 在Allow members of group sudo to execute any command下添加
bash 复制代码
# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL
# 添加的允许用户使用sudo命令的地方,如用户名为weizhongxin,根据自己的用户名进行修改
weizhongxin ALL=(ALL:ALL) ALL

三、添加桌面图标显示

新安装的系统,桌面默认没有显示图标,需要进行安装。

1.打开终端

2.执行安装命令

bash 复制代码
sudo apt install gnome-shell-extension-desktop-icons-ng

3.执行成功后重启

bash 复制代码
reboot

4. 打开扩展,配置图标

点击按钮就可以显示桌面图标了。还可以点击设置进行额外配置。


四、图形化界面关闭和打开

  • 关闭
bash 复制代码
systemctl stop gdm.service
  • 打开
bash 复制代码
systemctl start gdm.service
  • 关闭自启动
bash 复制代码
systemctl disable gdm.service
  • 开启自启动
bash 复制代码
systemctl enable gdm.service

五、设置静态IP

1.查询自己系统网络接口

bash 复制代码
ip addr

2.修改网络配置文件

bash 复制代码
vim /etc/network/interfaces

添加以下代码

bash 复制代码
auto ens33
allow-hotplug ens33
iface ens33 inet static
address 192.168.204.131
gateway 192.168.204.2
netmask 255.255.255.0

完整代码

bash 复制代码
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

auto ens33
allow-hotplug ens33
iface ens33 inet static
address 192.168.204.131
gateway 192.168.204.2
netmask 255.255.255.0

总结

相关推荐
不惑_2 天前
如何在 CentOS、Ubuntu 和 Debian 云服务器上安装 Python 3
ubuntu·centos·debian
kobe_OKOK_4 天前
windows 下载 pip包,debian离线安装
windows·debian·pip
ONE_SIX_MIX5 天前
Debian 的 网络管理器 被意外卸载,修复过程
服务器·网络·debian
迷路爸爸1805 天前
源码编译安装最新 tmux 教程(含 Debian/Ubuntu/CentOS/Arch/macOS 等系统)
linux·ubuntu·macos·centos·debian·tmux·archlinux
坐吃山猪5 天前
zk02-知识演进
运维·zookeeper·debian
木亦汐丫9 天前
Docker 镜像版本Alpine、Slim、Bookworm、Bullseye、Stretch、Jessie
运维·docker·容器·debian·alpine·slim·bullseye
天朝八阿哥13 天前
关于xfce4-pulseaudio-plugin中文翻译的bug
linux·debian
一文解千机15 天前
Termux Debian Arm64 源码编译安装坚果云,全平台同步笔记内容(也适用树莓派)
debian·termux·arm64·手机服务器·坚果云arm64·源码编译坚果云·termux坚果云
yy_xzz24 天前
Debian开发板TQ3658设置日期和时间显示 配置无法装入 发生未知的错误
运维·debian
1024find1 个月前
Docker安装(Centos/Ubuntu/UOS)
ubuntu·docker·centos·debian