Linux add to $PATH: Fix 'command not found' error (Linux & Mac)

preview_player
Показать описание
Linux add to path. Understand the "Command Not Found" error.

0:20 - What the $PATH environment variable does
1:18 - Example of using Linux $PATH
1:50 - Command not found error
2:14 - Running command from directory
3:03 - Updating your $PATH variable
4:00 - Append new folder to path
5:15 - Prepend new folder to beginning of path

One of the most important things to understand when installing programs and using your terminal is to know how the $PATH environment variable works on Linux, Mac, and even Windows systems.

In this video we'll show you how to work with your $PATH. In short, the $PATH variable lists all the directories that the computer will look through to try to find a command you've entered in the terminal. If you run a command, and it's not found in any of the folders in your $PATH, then it will throw an error "command not found".

You have several options.

1. Call the command by specifying the location of the executable file.

2. Move the executable file to a folder that's already in your $PATH

3. ADD the proper directory to the $PATH.

============ More Info ============

========================
Рекомендации по теме
Комментарии
Автор

LOLOLOL spent an whole hour why my script wasn’t executing just to realize I had the separator as a semi colon. Great explanation of PATH btw

frodobe_tbaggin
Автор

I cant write '#'over there, it shows no string

sakshamjain
Автор

Thank you so much brother, being trying to install brew on ubuntu and all the forms I checked in the past two hours kept bsing abt why it wasnt working. You went straight to the point why it isnt working ; how to make such an issue work and thats it.

har
Автор

Thank You Brother...finally someone that explains how it works, why it wasn't working, and what you need to do to fix it...with clear examples step by step, that are easy to read, watch, and understand and follow along.. I'm building a server, with 30tb of raid for storage, for my home and kids.I am turning a pair of docking stations and a server that came with 2 complete on site Professional Studio Editing Stations from the movie Life Of Pi and the Linux, Red Hat Nash, Fedora core 6 Kneel before Zod, and first edition Mint are all from 2005 and a lot of what I have been finding is new commands were not working. i needed the older yum instead of rpm stuff..lol and I am a 53 year old custom bike builder who is about 35+ years away from any kind of computer programing... so nice and slow works great for me..do you have anything on temporary failure on name resolution??

local
Автор

Amazing Video! Thank you so much sir, my fedora gnome environment was crashing because I change the path variable to a Java thing xd

xandrey
Автор

Damn man you are something else i have been looking for solutions about this path issues and fuck in 3 minutes i understood the whole idea of it. Thanks a lot !!!!

MERTECHNO
Автор

How to refresh after edition the bash file without restarting your computer?

mehdi.
Автор

I dont have bashrc in my mac. I do have bash_profile and I added the PATH there but doesn't seem to work for me

meghana
Автор

Excellent. Well done. Why or when would you need to "Prepend"?

joro
Автор

New to linux, at 1:38 I typed the command but HOW do I execute it?

FigNewtonBars
Автор

sudo is my command thats not found lol fml

justinjimenez
Автор

What to do if in fedora it comes ns command not found

aditi
Автор

1:39 how to i exit that screen when im done typing?

mattslayshorts
Автор

it really helps for me.... Thanks a lot!!! 감사합니다 bro

librae-
Автор

When I tried to install MongoDB on mac, it always shows : "mongod: command not found" . Can you please help me fix that?

ellapan
Автор

I get screwed after typing echo SPATH... it just shows SPATH and after typing apt-get update it says "command not found" :')

ladaf
Автор

What’s that website you mentioned at the end? I couldn’t get it, can you please write it if you get the chance? Thanks a lot . Good stuff

jusj
Автор

I'm stuck on a beginner problem of using git please a little Help is really appreciated I'm stuck on this for many days😟. So Whenever I create a new folder (For ex: repo) and on doing pwd (i.e., repo pwd ) even on changing directory (i.e., cd repo) it still always shows "command not found"
please

lunaticfringe
Автор

I try to run print hello world from atom file on terminal and when I do it says python comand not Found any idea?

stefanosjovanis
Автор

it doesn't work whrn u need to use sudo along with it

RameshKumar-rtxb