Debian


前言

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


一、使用root用户操作

直接使用su命令进行切换。
在这里插入图片描述

二、配置用户使用sudo命令

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

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

三、添加桌面图标显示

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

1.打开终端

在这里插入图片描述

2.执行安装命令

sudo apt install gnome-shell-extension-desktop-icons-ng

3.执行成功后重启

reboot

4. 打开扩展,配置图标

在这里插入图片描述

在这里插入图片描述
点击按钮就可以显示桌面图标了。还可以点击设置进行额外配置。


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

  • 关闭
systemctl stop gdm.service
  • 打开
systemctl start gdm.service
  • 关闭自启动
systemctl disable gdm.service
  • 开启自启动
systemctl enable gdm.service

五、设置静态IP

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

ip addr

在这里插入图片描述

2.修改网络配置文件

vim /etc/network/interfaces

添加以下代码

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

完整代码

# 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

总结

相关推荐

  1. <span style='color:red;'>Debian</span>

    Debian

    2024-04-21 19:34:04      33 阅读
  2. debian12 使用技巧

    2024-04-21 19:34:04       57 阅读
  3. Debian防火墙设置

    2024-04-21 19:34:04       57 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-21 19:34:04       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-21 19:34:04       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-21 19:34:04       82 阅读
  4. Python语言-面向对象

    2024-04-21 19:34:04       91 阅读

热门阅读

  1. ARM Day7

    2024-04-21 19:34:04       37 阅读
  2. Linux-System V共享内存

    2024-04-21 19:34:04       41 阅读
  3. Stable Diffusion 本地部署教程

    2024-04-21 19:34:04       31 阅读
  4. Solidity基础面试题

    2024-04-21 19:34:04       28 阅读
  5. Scala之List

    2024-04-21 19:34:04       32 阅读
  6. 自定义组件

    2024-04-21 19:34:04       29 阅读
  7. Git恢复至某一个提交的状态

    2024-04-21 19:34:04       34 阅读
  8. 【大模型系列】目录

    2024-04-21 19:34:04       35 阅读
  9. GoLang核心知识点

    2024-04-21 19:34:04       36 阅读
  10. Angular自定义异步表单验证

    2024-04-21 19:34:04       33 阅读