Home > other >  Linux centos 7/etc/profile was I changed my bad forgot to turned out to be what kind, how to restore
Linux centos 7/etc/profile was I changed my bad forgot to turned out to be what kind, how to restore

Time:09-19



Business code would only write four years of development, the distributed high concurrency also can't be a programmer? ->>


System version: 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 GNU/Linux
This is the first time to change the file, so who have default can send me a copy?
Here is my current the contents of the/etc/profile, I'm just in the last add a environment variables (later to restore deleted)
#/etc/profile

# System wide environment and startup, designed for the login setup
# Functions provides the and aliases go in/etc/bashrc

# It 's NOT a good idea to change this file unless you know what you
# are doing. It 's much better to create a custom sh shell script in the
#/etc/profile. D/to make custom changes to the environment, as this
# will prevent the need for merging in future updates.

Pathmunge () {
Case: ${PATH} ":" in
* : "$1" : *)
;;
*)
If (" $2 "=" after "); Then
PATH=$PATH: $1
The else
PATH=$1: $PATH
Fi
Esac
}


If [-x/usr/bin/id]; Then
If [-z "$EUID"]; Then
# KSH workaround
EUID=`/usr/bin/id -u `
UID=`/usr/bin/id - ru `
Fi
USER="`/usr/bin/id - the UN `"
LOGNAME=$USER
MAIL="/var/spool/MAIL/$USER"
Fi

# Path manipulation
If [" $EUID "=" 0 "); Then
Pathmunge/usr/sbin
Pathmunge/usr/local/sbin
The else
Pathmunge/usr/local/sbin after
Pathmunge/usr/sbin after
Fi

The HOSTNAME=`/usr/bin/HOSTNAME 2 & gt;/dev/null `
HISTSIZE=1000
If [" $HISTCONTROL "=" ignorespace "]. Then
Export HISTCONTROL=ignoreboth
The else
Export HISTCONTROL=ignoredups
Fi

The export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL

# By default, we want umask to get set. This sets it for the login shell
# Current threshold for system reserved uid/gids is 200
# You could check uidgid reservation gnosis.xml.validity in
#/usr/share/doc/setup - */uidgid file
If [$UID - gt 199] & amp; & [" `/usr/bin/id - designed.the gn ` "=" `/usr/bin/id - the UN ` "]. Then
Umask 002
The else
Umask 022
Fi

For I in/etc/profile. D/*. Sh/etc/profile. D/sh. Local; Do
If [-r "$I"]; Then
If [" ${I} - # * "!="$-"]. Then
. "$I
"The else
. "$I & gt;"/dev/null
Fi
Fi
The done

The unset I
The unset -f pathmunge

The execution of the source/etc/profile has been an error:

Using the/bin/vim/etc/profile deleted their add two lines, reload also is still the same mistakes, may I moved elsewhere, can you help me to return to normal?

CodePudding user response:

I found I want in your initial value of the thank you
  • Related