Add a new Directory to $PATH in Kali Linux

Hacking 101 Tools

I was installing this awesome tool called updog for my lazy ass.

Updog is a replacement for Python’s SimpleHTTPServer. It allows uploading and downloading via HTTP/S, can set ad hoc SSL certificates and use HTTP basic auth.

source :
└─$ pip3 install updog     
Defaulting to user installation because normal site-packages is not writeable
Collecting updog
  Downloading updog-1.4.tar.gz (2.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.5/2.5 MB 10.9 MB/s eta 0:00:00
  Preparing metadata ( ... done
Requirement already satisfied: colorama in /usr/lib/python3/dist-packages (from updog) (0.4.6)
Requirement already satisfied: flask in /usr/lib/python3/dist-packages (from updog) (2.2.2)
Collecting flask_httpauth
  Downloading Flask_HTTPAuth-4.8.0-py3-none-any.whl (7.0 kB)
Requirement already satisfied: pyopenssl in /usr/lib/python3/dist-packages (from updog) (23.0.0)
Requirement already satisfied: werkzeug in /usr/lib/python3/dist-packages (from updog) (2.2.2)
Building wheels for collected packages: updog
  Building wheel for updog ( ... done
  Created wheel for updog: filename=updog-1.4-py3-none-any.whl size=2445950 sha256=807e5dcb63602ef8e0a7d084c77a870132f668585b8f7ef15d2fc151f260d654
  Stored in directory: /home/haxor/.cache/pip/wheels/d8/9f/4d/a6ae1b9f058db9e46797e8e67bf4a8d67e6bae72534fb66b92
Successfully built updog
Installing collected packages: flask_httpauth, updog
  WARNING: The script updog is installed in '/home/haxor/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.                                                  
Successfully installed flask_httpauth-4.8.0 updog-1.4 

Uh-oh, I need to heed that warning!!

The default shell of Kali Linux is now zsh. We need to add this line to .zshrc and re-source it.

export PATH="/home/haxor/.local/bin:$PATH"

It is easy to check the $PATH variable and then add the new new line.

Re-source the file and now everyhing works!!

└─$ echo $PATH
└─$ printenv PATH

└─$ vi .zshrc 
└─$ source .zshrc       
└─$ printenv PATH
└─$ updog
[+] Serving /home/haxor...
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (
 * Running on
 * Running on
Press CTRL+C to quit - - [17/May/2023 09:00:55] "GET / HTTP/1.1" 200 -

4 thoughts on “Add a new Directory to $PATH in Kali Linux

    1. Hey bro! I bet you are using the default username and password of kali, so you will need to use this:

      export PATH=”/home/kali/.local/bin:$PATH”

      Please feel free to holler if you need more help

  1. I was installing a python3 based script called “rtspbrute” so I typed python3 -m pip install rtspbrute. and hit enter
    It downloaded some…and at last had me with warning that the script pyav is in the directory /home/myname/.local/bin which is not on poth. Consider adding this to path
    The script rtspbrute is installed in /home/myname/.local/bin which is not on path…..can any you pls help me

    1. Yes, the solution was in the article. Open up .zshrc in an editor, such as vim.

      └─$ vi .zshrc

      Add the new path you need:

      Exit the editor and check your new path.

      └─$ printenv PATH

      Then update with the following command:

      └─$ source .zshrc

      Then you should be good to go. Feel free to holler if you run into any issues!

Leave a Reply

Your email address will not be published. Required fields are marked *