Infrastructure @ ABI

FreeBSD, Linux, LDAP, DNS, DTrace, ZFS, Jails & more...

Set Default VENV

Follow these steps to automatically activate a virtual environment named "fivepseq-env" when logging in:

  1. Navigate to Your Home Directory: Open a terminal and navigate to your home directory. You can do this by running the following command:
cd ~
  1. Open Your Bash Profile: Use a text editor to open your .bash_profile. This file is typically located in your home directory. You can open it with vim editor by running:
vim .bash_profile

Note: If .bash_profile doesn't exist, don't worry. You can create a new one. Simply run vim .bash_profile and start editing the file. Once you've added the necessary content, save the file and proceed to the next steps.

  1. Add the Activation Line: In the .bash_profile file, add the following line at the end:
source /mnt/home/lilit/fivepseq-env/bin/activate
  1. Save and Exit: After adding the line, save the changes and exit the text editor. In vim editor, you can do this by pressing Esc to exit editing mode, then typing :wq to save and quit.
  1. Reload Bash Profile: To apply the changes, reload your .bash_profile. You can do this by running:
source .bash_profile
  1. Verify Activation: You can verify that the virtual environment is activated by opening a new terminal session. Upon logging in, the virtual environment specified in the .bash_profile should be activated automatically.

That's it! Now, whenever you log in, the specified virtual environment will be automatically activated, allowing you to work within its isolated environment.



You can follow our feed using RSS: https://infra.abi.am/feed.rss

If you have any questions, contact us at it-support@abi.am.


Ararat Hovhannisyan

Tags: Updates