LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-13-2021, 01:34 AM   #1
meallhour
LQ Newbie
 
Registered: Feb 2021
Location: USA
Posts: 13

Rep: Reputation: Disabled
`which export` not showing path of the executable


When I run which export I get the following output:

Code:
[root@localhost abc]# which export
/usr/bin/which: no export in (/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/root/bin)
However, I am successfully able to run the following command

Code:
export PATH=$PATH:/tmp
My question why I am able to run the export command successfully even the export command is not defined in the PATH variable
 
Old 02-13-2021, 03:00 AM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,823
Blog Entries: 1

Rep: Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068Reputation: 2068
Export is a command internal to the shell. See here.
 
2 members found this post helpful.
Old 02-13-2021, 10:52 AM   #3
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,805

Rep: Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204Reputation: 1204
export is a shell keyword.
Run
Code:
type export
What is type?
Code:
type type
And why does which not know about shell internals?
Code:
type which

Last edited by MadeInGermany; 02-13-2021 at 10:59 AM.
 
1 members found this post helpful.
  


Reply

Tags
bin, binaries, export, path, rhel



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
[SOLVED] Need export PATH=$PATH: battles Linux - Networking 5 11-20-2014 10:15 AM
[SOLVED] bash: export: `=': not a valid identifier - bash: export: `0': not a valid identifier PClOStinspace Linux - General 4 01-24-2014 01:11 PM
[SOLVED] How to get the absolute path of the running executable file and current work path ? 915086731 Programming 3 11-01-2011 09:28 AM
Ubuntu 8.04 loses my $PATH. Why do I have to repeatedly export PATH= ? oouc Ubuntu 10 09-13-2009 11:54 PM
export Path=/usr/java:$Path does not seem to work lumix Linux - Newbie 1 03-19-2007 03:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:01 AM.

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