Score:1

When I edit .bashrc in Ubuntu 20.04, it does not ask me to save anymore

ph flag

I'm not sure what happened but when I sudo nano ~/.bashrc to add a couple of exports

#spotify
export SPOTIFY_CLIENT_ID='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
export SPOTIFY_CLIENT_SECRET='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

before it would ask me something about saving changes, I'd ctrl-x to exit and then it would ask me if I wanted to save changes to which I'd answer 'yes' and ctrl-X to exit but now it skips this and goes right back to

(spotifydl) nobu@nobu-IdeaPad-3-15IIL05:/media/nobu/NTFSUbuWin/downloadsUbu$ 

where spotifydl is the activated conda environment where I have the pip package installed. https://github.com/SathyaBhat/spotify-dl/blob/master/GETTING_STARTED.md

Why is Ubuntu skipping the ctrl-X save step after editing .bashrc now? doing source ~/.bashrc seems to have no effect now (because of this?)

Edit as directed by @sudodus here is the output.

-rw-r--r-- 1 nobu nobu 5540 Oct 30 11:10 /home/nobu/.bashrc

I tried

nano ~/.bashrc

The exports are there but again I am not prompted to save.

sudodus avatar
jp flag
The ownership and permissions are OK. The problem is somewhere else. But you do remember, that if you did not change anything, `nano` knows that, and exits without saving? So try again with `nano ~/.bashrc` and add something harmless, try to save it, and check what happens.
WinEunuuchs2Unix avatar
in flag
It would be interesting to try `gedit ~/.bashrc` and see if that allows you to save changes.
mLstudent33 avatar
ph flag
I tried `gedit ~/.bashrc` and I clicked save, closed the editor, did `source ~/.bashrc` and still the same.
mLstudent33 avatar
ph flag
I tired `nano ~/.bashrc` now added a word `yay` to the comment and now it prompted me. I always thought editing .bashrc was a sudo command because I remember it asking me to use sudo back when I had Ubuntu 16.04 and it just became a habit.
sudodus avatar
jp flag
Please run `ls -l ~/.bashrc` and edit the original question to show the output from the command. It will tell us if you have created problems with ownership because you use `sudo` when you should not. It is a file that should belong to your normal user ID. - Try with `nano ~/.bashrc`
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.