What does hashed mean when applied to a path in linux or Mac bash?
When I use the command in bash:



type python3
I get:
python3 is hashed (/usr/local/bin/python3)



What does hashed mean. Sometimes I get hashed and sometimes just the path line.
Theoretically, every time you type a command name like foo that doesn't include a /, the shell looks at each directory in your PATH variable to find a command named foo to execute.
This is somewhat time-consuming and redundant (your commands don't really move much), so the shell only performs the full PATH lookup once, and caches the result. Typically, it uses a hash table so that command names can be looked up quickly, so "python3 is hashed (/usr/local/bin/python3)" is short for

python3 was found in the hash table and mapped to the path /usr/local/bin/python3

The difference between foo is bar and foo is hashed (bar) is that in the former, foo hasn't been executed yet; type itself does not store the result in the hash table on a successful lookup.
What does hashed mean