Skip to content

Commit 7d97747

Browse files
axh2018labuladong
authored andcommitted
Update linuxshell.md
1 parent c1f65f3 commit 7d97747

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

技术/linuxshell.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ $ where connect.sh
123123

124124
**当使用`sudo`时,系统认为是 root 用户在执行命令,所以会去搜索 root 用户的环境变量**,而这个脚本在 root 的环境变量目录中当然是找不到的。
125125

126-
解决方法是使用脚本文件的路径,而不是仅仅通过脚本名称
126+
解决方法是使用脚本文件的绝对路径,而不是用脚本的相对路径
127127

128128
```shell
129129
$ sudo /home/fdl/bin/connect.sh

0 commit comments

Comments
 (0)