echo $PATH 与 /etc/profile 不同?

问题描述 投票:0回答:2

etc/profile

if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
        PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
else
        PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"
fi
export PATH
unset ROOTPATH

echo $PATH

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

所以:

/usr/local/bin is not showing up, so I think it may be using a different file.

我尝试过将 export PATH=$PATH:/usr/local/bin 放在一起,这很好,但这不是永久的。

unix gentoo
2个回答
1
投票

检查你的 shell 初始化文件,bash 是

/etc/bashrc
/etc/bash.bashrc
或类似的东西以及
~/.bashrc
~/.bash_profile
。大多数 shell 都有类似的初始化脚本,请查看手册。

另请查看

/etc/env.d/*
/etc/environment


0
投票

Informix 数据库是使用根数据库(破坏性地)初始化的,并且我在配置文件中找到了一些设置,供您细读

ROOTNAME specifies a name for the root dbspace for this database server configuration.
ROOTOFFSET specifies the offset into an allocation of disk space (file, disk partition, or device) at which the initial chunk of the root dbspace begins.
Use the ROOTPATH configuration parameter to specify the full path name, including the device or file name, of the initial chunk of the root dbspace. The ROOTPATH configuration parameter is stored in the reserved pages as a chunk name.
Use the ROOTSIZE configuration parameter to specify the size in kilobytes of the initial chunk of the root dbspace. The size that you select depends on your immediate plans for your database server.

注意 ROOTPATH 是一个文件名,它保存在“保留页面”中,就像 login.defs 文件一样。

我怀疑这是一个过时的神器......

© www.soinside.com 2019 - 2024. All rights reserved.