Score:0

Error while loading .profile on ubuntu 20.04

cn flag

Yesterday I have changed my .profile to include go path. And it looks like this:

if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi

GOPATH="$HOME/go"
PATH="$PATH:$GOPATH/bin"

When I run my laptop the next time, it is showing me a dialog that says there is an error in line 1.

What is wrong with my .profile file?

pasman pasmański avatar
mx flag
Welcome to AskUbuntu! You probably do not include line 1, containing `# ~/.profile: executed by the command interpreter for login shells.`
Javlon avatar
cn flag
@pasmanpasmański, I have added that and it is not giving an error. Thanks a lot :).
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.