LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-11-2017, 12:14 AM   #1
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Rep: Reputation: Disabled
Missing environmental variables in CentOS7?


Code:
[root@centos7-1024ram-minimal ~]# cat /etc/environment 
#Returns nothing.
~/.bash_profile is the place for
user specific environment and startup programs.
E.g. Adding a new path to PATH variable.
So PATH was defined before .bash_profile is executed.

Since /etc/environment is empty,
but command env produces a lot of
environmental variables.
Where were those env variables defined?

Thank you.
 
Old 04-11-2017, 01:40 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
all over the place, is my guess.
and as you can see from the output.
certain shells have the ability to define persistent environment variables, i think they're called login shells.
everything that a login shell parses. (i hope i'm right with this, it's sort of "felt" knowledge)
good starting point: /etc/bash.bashrc /etc/profile, and the same for your $HOME
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting environmental variables Ninju Linux - Newbie 3 09-25-2007 04:29 PM
Environmental Variables danglingpointer Slackware 13 01-06-2005 12:36 AM
environmental variables msound Programming 0 08-21-2004 07:06 PM
environmental variables? blackzone Linux - General 1 08-06-2004 03:44 AM
environmental variables mbhenry Linux - General 6 09-18-2003 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration