美文网首页
Debian ifconfig 、ufw 等命令无效

Debian ifconfig 、ufw 等命令无效

作者: Rinaloving | 来源:发表于2025-02-12 21:25 被阅读0次

原因

我按照 deepseek 后导致所有命令失效

1. 检查 PATH 环境变量

echo $PATH

正常情况下,PATH 应该包含以下路径(或其他类似的路径):

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

我的电脑


image.png

2. 永久修复 PATH

对于 Bash,编辑 ~/.bashrc 或 ~/.bash_profile:

vim ~/.bashrc

在文件末尾添加:

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH

使文件生效

source ~/.bashrc  # 或者 source ~/.zshrc

相关文章

  • ifconfig命令无效

    在新装了centos7后使用ifconfig命令无效,在网上查看资料后解决。需要安装net-tools,具体代码如...

  • Debian 9 的netstat和ifconfig哪去了?

    全新安装了Debian 9,发现netstat和ifconfig命令不见了: 原来,Debian 9 默认不再包含...

  • ufw on Debian

    一、ufw安装 二、设置 三、其他常用 四、卸载 <参考>https://wiki.ubuntu.org.cn/U...

  • ubuntu札记2_常用命令2

    系统状态检测命令 ifconfig ifconfig命令常用于获取网卡配置和网络状态等信息,包含:网卡名称、IP地...

  • linux命令汇总~四

    ifconfig命令 使用 ifconfig ech0(设备的网卡号) up、down等操作。 设置mark地址...

  • 自带防火墙ufw

    链接ufw命令的示例用法 ufw status # 查看ufw防火墙是否在工作,查看使用中的规则 ufw enab...

  • Linux网络命令

    1. ifconfig命令 ifconfig命令:查看与网络配置网络状态命令 使用ifconfig命令查看IP地址...

  • 《Linux就该这么学 》笔记-系统状态检测命令

    1:ifconfig 命令 用于获取网卡配置与网络状态等信息,格式为“ifconfig [网络设备] [参数]”。...

  • Linux-系统状态检测命令

    ifconfig 命令用于获取网卡配置与网络状态等信息,格式为“ifconfig [网络设备] [参数]”。una...

  • Linux命令(3)

    2、系统状态检测命令 #ifconfig 获取网卡配置以及网络状态等信息,格式为“ifconfig [网络设备][...

网友评论

      本文标题:Debian ifconfig 、ufw 等命令无效

      本文链接:https://www.haomeiwen.com/subject/vschpjtx.html