怎么安装ifconfig命令
Tofloor
poster avatar
liubailinprivate
deepin
2019-01-12 02:01
Author
如题
Reply Favorite View the author
All Replies
avatar
Dracarys
deepin
2019-01-12 02:18
#1
sudo apt-get install net-tools

试试
Reply View the author
avatar
Amadeus
deepin
2019-01-12 02:26
#2
终端可以用这个命令啊。
Reply View the author
avatar
liubailinprivate
deepin
2019-01-12 02:30
#3
liubailin@liubailin-PC:~$ sudo apt install net-tools
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
net-tools 已经是最新版 (1.60+git20161116.90da8a0-2)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
liubailin@liubailin-PC:~$ ifconfig
bash: ifconfig: 未找到命令
liubailin@liubailin-PC:~$


Reply View the author
avatar
liubailinprivate
deepin
2019-01-12 02:31
#4
https://bbs.deepin.org/post/173580
sudo apt-get install net-tools

试试

liubailin@liubailin-PC:~$ sudo apt install net-tools
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
net-tools 已经是最新版 (1.60+git20161116.90da8a0-2)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
liubailin@liubailin-PC:~$ ifconfig
bash: ifconfig: 未找到命令
liubailin@liubailin-PC:~$
Reply View the author
avatar
Dracarys
deepin
2019-01-12 02:54
#5
环境变量问题吧
用绝对路径能执行吧
/sbin/ifconfig
Reply View the author
avatar
liubailinprivate
deepin
2019-01-12 03:07
#6
应该我把/etc/profile文件给删了,谁发一份给我吧。谢谢。
Reply View the author
avatar
Dracarys
deepin
2019-01-12 03:14
#7
  1. # /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
  2. # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

  3. if [ "`id -u`" -eq 0 ]; then
  4.   PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  5. else
  6.   PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin"
  7. fi
  8. export PATH

  9. if [ "$PS1" ]; then
  10.   if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
  11.     # The file bash.bashrc already sets the default PS1.
  12.     # PS1='\h:\w\$ '
  13.     if [ -f /etc/bash.bashrc ]; then
  14.       . /etc/bash.bashrc
  15.     fi
  16.   else
  17.     if [ "`id -u`" -eq 0 ]; then
  18.       PS1='# '
  19.     else
  20.       PS1='$ '
  21.     fi
  22.   fi
  23. fi

  24. if [ -d /etc/profile.d ]; then
  25.   for i in /etc/profile.d/*.sh; do
  26.     if [ -r $i ]; then
  27.       . $i
  28.     fi
  29.   done
  30.   unset i
  31. fi
  32. tty | egrep -q tty[1-6] && export LC_ALL=C
Copy the Code
Reply View the author
avatar
liubailinprivate
deepin
2019-01-12 03:17
#8

Thanks !
问题解决了。 
Reply View the author
avatar
A·S·M·X·T 😏😜
deepin
2019-01-12 05:55
#9
在deepin里root和普通账户的$PATH是不同的,所以有一些系统管理的命令普通账户没有,但在root账户就有。
Reply View the author