- Learn Python in 7 Days
- Mohit Bhaskar N. Das
- 61字
- 2025-04-04 19:20:06
Setting environment variables in Linux
Linux comes with different types of shells and the Python directory path is usually /usr/local/bin/python:
- csh shell: Open the terminal and enter setenv PATH "$PATH:/usr/local/bin/python" followed by pressing Enter
- bash shell: On the terminal, enter export PATH="$PATH:/usr/local/bin/python" followed by pressing Enter
- sh or ksh shell: Enter PATH="$PATH:/usr/local/bin/python" followed by pressing Enter