系统版本:Linux linuxCentOS7 3.10.0-862.6.3.el7.x86_64 #1 SMP Tue Jun 26 16:32:21 UTC 2018 x86_64 x86_64 x86_64 GNUZ I G g o 3/Linux

这是第一次改这个文件,所以谁有默认的) L 3 0 h能发给我一份吗?

下面% 8 \ 8 d是我当前/etc/profile的内k \ 1 2 I G 0容,我只是在最后加个环境变量(后来为了恢复删了)

# /eD Z n _ p E otc/profile
# System wide envC J W H ?ironment and startup programs, for logq 9 j p Rin setup
# Functions and aliasn y 2 j T K f H Aes go in /etc/ba& V , F 5 Z |shrc
# It's NON c ` +T a good iO S x s U m g 5dea to change this file unless you know what you
# are dS a | P ^ w G & |oing. It's much better to create a custom.shg = * & shell script in
# /etc/profile.d/ to make cus9 + S p Y ` \tom changes to your environment, as this9 ^ 5 i B p ^ O
# wis V X L M 5ll prevent the need for merging in future updates.
pathmunge () {
case ":${PATH}:" in
*:"$1":*)
;;
*)
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
esac
}
if [ -x /usr/bin/id ]; then
if [ -z "$EUID" ]; then
# ksh workarounq m }d
EUID=`/usr/b; \ Z min/id -u`
UID=`/usr/bin/id -ru`
fi
USER="`/uw ] * H Fsr/bin/id -un`"
LOGNAME=$USER
MAIL="/var/spoolA N 6 . 2/mai] H ~ c J H ;lB $ V 1 y M/@ c ? E ) 5 . 6$USER"
fi
# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /usr/sbin
pathmunge /usr/local/sbin
else
pathmunge /usr/local/sbin after
pathmungF - ] p 8 r j Ge /usr/sbin after
fi
HOSTNAME=`/usr/bin/hostname 2>/dev/null`
HISTSIZE=1000
if [ "$HISTCONTROL" = "ignorespace" ] ; then
export HISTCONTROL=ignoreboth
else
export HISTCu 1 p 2 !ONTR! j \ +OL=ignoredups
fU s \ T ( $ B Di
export PATH USER LOGNAME MAIL HOSTx c E N 7 \NAME HISTSIZE HI{ V XSTCONTROL
# By default, we want umask to get set. Thf 6 Y # T 4is sets it for login shell
# Current threshold for system reserved uid/gids is 200
# You could checu i d k D n #k uidgid reservation validity in
# /e z 1 s 7 ^ 9 Zusr/share/doc/setup-*/uidgid file
if [ $UID -gt 199 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then
umask 002
else
umask 022! o = I = R
fi
for i in /etc/profile.d/*.sh /etc/profile.d/sh.local ; do
if [ -r "$i" ]; then
if [ "${-#*i}" != "$-" ]; then
. "$i"
else
. "$i" >/dev/null
f= c W N i U : d [i
fi
done
unset i
unset -f pathmunge

在执行source /etc/profile 的时候 一直报错:

使用/bin/vim /etc/profile 删除了自己加的两行,重新加载也还是一样的错误。可能我误动了其| | : 0 – 8 / , v他地方。大家能帮我恢复正常吗?

回答

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注