免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123
最近访问板块 发新帖
楼主: whoiam
打印 上一主题 下一主题

solaris的系统默认命令的PATH如何修改? [复制链接]

论坛徽章:
0
21 [报告]
发表于 2006-01-23 21:19 |只看该作者
/etc/default/su 这个文件 仅仅对 用户su为Root时候生效呀
我是 rsh呀,不是root

论坛徽章:
0
22 [报告]
发表于 2006-01-24 10:08 |只看该作者
这个是我man su时看到的,但这个值与rsh时看到的PATH是一样的,所以可以试一下,(我现在在试)
10分钟后给结果

[ 本帖最后由 doni 于 2006-1-24 10:13 编辑 ]

论坛徽章:
0
23 [报告]
发表于 2006-01-24 10:23 |只看该作者
猜错了,改/etc/default/su无效
改/etc/default/login 也无效

[ 本帖最后由 doni 于 2006-1-24 11:55 编辑 ]

论坛徽章:
0
24 [报告]
发表于 2006-01-24 11:57 |只看该作者
man 了一下sh & ksh
发现default PATH is /usr/bin
看样子是没法必,除非有shell的源码,改了重新编译

论坛徽章:
0
25 [报告]
发表于 2006-01-25 19:39 |只看该作者
我的默认SHell都是bash

论坛徽章:
0
26 [报告]
发表于 2006-01-26 09:40 |只看该作者
man bash发现与ksh & sh 不一样
     PATH The search path for commands.  It is a  colon-separated
          list  of  directories in which the shell looks for com-
          mands (see COMMAND EXECUTION below).  The default  path
          is  system-dependent,  and  is set by the administrator
          who    installs    bash.
man sh
The shell parameter PATH defines the  search  path  for  the
     directory  containing  the  command.  Alternative  directory
     names are separated by a colon  (.  The  default  path  is
     /usr/bin
man ksh
     The shell variable PATH defines  the  search  path  for  the
     directory  containing  the  command.  Alternative  directory
     names are separated by a colon  (.  The  default  path  is
     /bin:/usr/bin:

论坛徽章:
0
27 [报告]
发表于 2006-01-28 21:13 |只看该作者
头都看晕了,期待答案!

论坛徽章:
0
28 [报告]
发表于 2006-10-26 15:00 |只看该作者
新建$HOME/.profile      
编辑PATH=……
重新登陆
#echo $PATH   试试

论坛徽章:
0
29 [报告]
发表于 2006-10-26 15:14 |只看该作者
在/etc/profile 里直接添加一行PATH=……
重新登陆也可以
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP