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

总结

相关推荐
Christal_pyy2 天前
树莓派4基于Debian GNU/Linux 12 (Bookworm)系统安装
linux·运维·debian
无名3872 天前
rtpengine build mr12.5.1 镜像
运维·debian
greenery5 天前
debian 12 安装 NVIDIA 390驱动记录
debian·nvidia·飞牛
zeandon5 天前
VMWare安装Debian操作系统
debian
zeandon5 天前
Debian系统终端输入ifconfig报错
debian
翻滚吧键盘5 天前
配置终端代理
debian
yellow俊的linux之路5 天前
debian 12 系统容器更换阿里源和用户权限
运维·debian
Christal_pyy6 天前
树莓派4基于Debian GNU/Linux 12 (Bookworm)添加多个静态ipv4网络
linux·网络·debian
fareast_mzh10 天前
Build OpenSSL 1.1.1w from source on Debian 11 (x86_64),
运维·debian
sjh210010 天前
学习笔记之debian的thonny开发(尚未验证)--从stm32裸机到linux嵌入式系统
linux·stm32·嵌入式硬件·debian·硬件工程