Score:0

How can I add the .bash_profile in WSL (ubuntu)?

me flag

I want to install Gaussian software on the WSL. I have tried to install but I can't find the .bash_profile or .bashrc files in the HOME path. I have tried to make a text file using vim editor. I wrote the following text in the text file:

# .bash_profile

# Gaussian intialization sequence
g16root=~/gaussian16_install
GAUSS_SCRDIR=~/Documents/SCRATCH
export g16root GAUSS_SCRDIR
. $g16root/g16/bsd/g16.profile

but when I write the command: g16 I get the message: command not found

It seems that the .bash_profile is not identified by the OS. I wonder if anyone can guide me?

cocomac avatar
cn flag
@waltinator No. It is an official version of Ubuntu, and, because it has been released (for a long time now), it [is on topic](https://meta.askubuntu.com/q/15229/) per Meta. Unless the OP is using a different distro in WSL, the question is on-topic
NotTheDr01ds avatar
vn flag
Welcome to Ask Ubuntu! Ubuntu under WSL doesn't behave any differently in handling `~/.bash_profile`. Before we start to suspect a problem there, try to run those same commands directly in the shell, then see if you can launch `g16`. If you can't, it points to a problem earlier in the installation process.
NotTheDr01ds avatar
vn flag
Also, can you provide more detail on *how* you installed g16? The [platform doc](https://gaussian.com/g16/g16_plat.pdf) indicates that it's only supported on RPM based distributions. I found some fairly old [instructions](https://ubuntuforums.org/showthread.php?t=2292187) regarding g9 on Ubuntu, and they seem to indicate that some extensive changes are needed to the scripts due to differences in program locations. Note that openSUSE Leap 15.2 is available for installation on WSL, and that *may* be close enough to the supported 15.0 to work. That's *if* this is a problem with g16 on Ubuntu.
NotTheDr01ds avatar
vn flag
Finally, per @cocomac's comment, can you confirm that you *are* using Ubuntu? Add the contents of `cat /etc/os-release` to your question to confirm. Thanks!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.