Skip to main content

Questions tagged [.profile]

A user-specific (not systemwide) configuration script executed when starting login shells.

Filter by
Sorted by
Tagged with
251 votes
7 answers
439k views

Why ~/.bash_profile is not getting sourced when opening a terminal?

Problem I have an Ubuntu 11.04 Virtual Machine and I wanted to set up my Java development environment. I did as follows sudo apt-get install openjdk-6-jdk Added the following entries to ~/....
Viriato's user avatar
  • 2,621
106 votes
5 answers
282k views

I cannot find .bash_profile in ubuntu

I can't find .bash_profile in Ubuntu 14.04 in my /home/user directory. I used the ls -a command to see the .bash_profile, but there isn't such a file.
Roledenez's user avatar
  • 1,185
91 votes
2 answers
74k views

What are login and non-login shells?

It is said that settings for non login shell to go into .bashrc file and login shell settings to go into .profile file. What is really meant by login and non-login shells? Please explain without ...
DUKE's user avatar
  • 3,368
84 votes
5 answers
118k views

Why are scripts in /etc/profile.d/ being ignored (system-wide bash aliases)?

I'm new to Ubuntu. I'm running 13.10 Desktop. I wanted to set some system wide aliases and a custom prompt for bash. I found this article: https://help.ubuntu.com/community/EnvironmentVariables ...
Drew's user avatar
  • 851
81 votes
4 answers
260k views

Permanent PATH variable

How will I make this /media/De Soft/mongodb/bin PATH variable permanent? Everyone is saying "export PATH=$PATH:media/De\ Soft/mongodb/bin to your ~/.profile, or .bashrc, or .zshenv depending on your ...
Towhid's user avatar
  • 4,085
79 votes
2 answers
81k views

Why isn't .profile sourced when opening a terminal?

Just installed Ubuntu 14.04.1 LTS. According to .profile, # ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash, if ~/.bash_profile or ~/.bash_login ...
B Seven's user avatar
  • 1,039
55 votes
3 answers
54k views

Sequence of scripts sourced upon login

I would like to concentrate all my login config in my ~/.bash_profile. There was a ~/.bashrc there by default but I replaced it with a ~/.bash_profile. However, when I log in, something before my ~/....
amphibient's user avatar
  • 1,277
51 votes
6 answers
80k views

Why is /etc/profile not being loaded during non-login bash shell sessions?

For 11.04, I did a fresh install of my system. Part of that install was to install rvm, which sticks a rvm.sh in /etc/profile.d/. This doesn't work as /etc/profile (which loads each +r in /etc/profile....
Marc's user avatar
  • 513
39 votes
3 answers
20k views

What goes in ~/.profile and ~/.bashrc?

I'm having trouble wrapping my head around what belongs in ~/.profile and what belongs in ~/.bashrc. From what I've read, it seems to me that ~/.profile should be used for environment variables and ~/....
MDeBusk's user avatar
  • 1,200
33 votes
2 answers
14k views

Why does Ubuntu's default ~/.profile source ~/.bashrc?

These are the contents of the stock ~/.profile that came with my 13.10 (commented lines removed): if [ -n "$BASH_VERSION" ]; then if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi fi ...
terdon's user avatar
  • 102k
29 votes
4 answers
51k views

Configure gnome-terminal to start bash as a login shell, doesn't read .bashrc

I'm trying to integrate RVM with gnome-terminal. Per default, gnome-terminal does not start bash as a login shell. I enabled run command as a login shell as suggested in this answer about the same ...
Arturo Herrero's user avatar
20 votes
2 answers
27k views

how to reset ~/.profile to default

I have been playing around with the ~/.profile file trying to add something permanently to my $PATH variable and it seems i have done some damage. I can't log into ubuntu now. When I enter my ...
Adrian Buzea's user avatar
18 votes
1 answer
8k views

How can I restore /etc/profile?

I'm working on a bash script that appends to /etc/profile, but instead of appending, I accidentally wrote over it, losing all of its content. How can I restore the file? Is there a system default ...
Alex's user avatar
  • 423
18 votes
1 answer
31k views

What can cause my .profile file to not be loaded when a new terminal shell is initialized?

There are no errors in xsession and I don't have a .bash_login or .bash_profile file, so I'm 100% certain neither of those is loaded and thus cancels .profile loading. When I rename the .profile to ....
Swader's user avatar
  • 325
16 votes
5 answers
28k views

Why is setting alias in .profile not working?

I have this as the last line in my .profile: alias gl="cd /home/jrenner/glances/glances" yet even after reboot I get command not found when typing gl. What is happening? I am logged in as the ...
talloaktrees's user avatar
16 votes
4 answers
28k views

/etc/profile vs ~/.profile

I run ubuntu 12.04.1 LTS. And I can't get what is the order/priority for loading profile files. When I start the system and login using GUI which file is loaded? And why? What if run login-shell? Will ...
sunprophit's user avatar
14 votes
3 answers
26k views

Can I ssh into my account without invoking .profile?

I want to ssh into my account, but I don't want the current version of my .profile login script to be executed. Is there a way to log in without running .profile? (Disclaimer: I found a work-around ...
Jeremy Stein's user avatar
11 votes
2 answers
10k views

Why do I have to `source .profile` in every terminal I open?

When we change some variable in ~/.profile in Ubuntu, then we execute the command source .profile. Then the change is effective only in this terminal. If we open a new terminal we have to execute the ...
cainiaofei's user avatar
11 votes
3 answers
10k views

Where is my PATH variable being set?

I'm trying to set my path variable to look like this: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/jgrande/android-sdk-linux/platform-tools:/usr/lib/...
user1617942's user avatar
10 votes
2 answers
6k views

Why .profile (and not .bashrc) appends ~/bin to path?

Since .bashrc is more "generic" (in the sense that .profile sources it), why "include ~/bin to path" procedure is not inside .bashrc? Why the user would not want it in a non-login shell? (Especially ...
borges's user avatar
  • 525
9 votes
1 answer
681 views

Where are the pristine, untouched contents of a ~/.profile file?

Several files in my home directory have been disappearing. E.g. .bashrc, .bash_profile, authorized_keys and now .profile. Regardless of how this happened, I would like to restore the original ...
Jay's user avatar
  • 205
8 votes
7 answers
22k views

How to set default umask in Ubuntu 17.04?

In the past, I have always set umask at ~/.profile. I set a umask of 077 so my documents get a permission of 600 (rw-------). But setting this at ~/.profile no longer works in Ubuntu 17.04. So as new ...
G.W.'s user avatar
  • 673
8 votes
1 answer
2k views

Is .profile read upon GUI login

In this question, it is mentioned that there is no standard behavior in terms of whether .profile is read or not when a user logs in from the GUI in today's Linux and Unix systems. So for Ubuntu, is ....
Tosh's user avatar
  • 409
7 votes
2 answers
13k views

Where to place local executables [duplicate]

Where is the correct place to store user-local executable files? echo $PATH gives /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games It doesn't include eg. $HOME/bin Would $...
JohnDoe's user avatar
  • 183
7 votes
1 answer
1k views

Is there one file that all Desktop Managers (GNOME, KDE, XFCE and etc) are required to read/execute when users login?

I use GNOME and it first executes commands from /etc/profile and then from ~/.profile. This I have found by putting statements like echo 'something' > test in all files that i could think of like ....
binW's user avatar
  • 13.1k
6 votes
1 answer
1k views

Ubuntu Desktop: Why the .profile script is executed in an interactive non-login shell?

I understand about the difference between Interactive login and Interactive non-login According with this excellent post: Zsh/Bash startup files loading order (.bashrc, .zshrc etc.) we have the ...
Manuel Jordan's user avatar
5 votes
4 answers
7k views

How to log in after wrongly modifying path

I wanted to add a path so that the system could find some manually installed executable. However, instead of typing PATH=xxx:$PATH;export PATH at the end of ~/.profile where xxx is the directory in ...
user avatar
5 votes
3 answers
7k views

How to fix ~/.profile and ~/.bashrc syntax errors

Ubuntu 18.04.4 (automatic upgrade from 18.04.3 just a few weeks ago) /bin/bash After I log in from the Gnome shell, this message appears while the screen is just plain purple and before the desktop ...
Hedley Finger's user avatar
5 votes
2 answers
42k views

How do I get Ubuntu to use Anaconda's python instead of the standard /usr/lib/python...?

I installed Anaconda using instructions provided on the main website, which are similar to those that can be seen here: How to install Anaconda on Ubuntu? However, I found that I had to manually ...
user avatar
5 votes
1 answer
2k views

`alias` command in `.profile` not recognized until `source .profile` is called

I have the following line in my .profile file in my home directory: alias flux='redshift -O 2500' But whenever I login and type flux I get a flux is not a recognized command. I then do a source ....
amortaza's user avatar
  • 153
5 votes
2 answers
980 views

Shell prompt customization and cmd behavior

I want my prompt to display: current (absolute) working directory, colored in green and in a NEW line, the dollar sign and an empty space. I am using this line in .profile export PS1='\e[0;32m$(pwd)...
pkaramol's user avatar
  • 2,191
5 votes
1 answer
3k views

Ubuntu 12.04 doesn't seem to execute my .profile file

(I'm kinna n00bish) 1: I had ubuntu 11.10 installed, then upgraded to 12.04. 2: I had a script in my .profile file to turn off my laptop's touchpad (it worked, and was executed on login) 3: Now it ...
vlad-ardelean's user avatar
5 votes
3 answers
5k views

Remove brew completely from my system

I interrupted the execution of homebrew while installing. Consequently, I ran into a problem mentioned here Error found when loading /home/user/.profile:. I had to comment eval statements in the ...
Lawhatre's user avatar
  • 177
5 votes
1 answer
2k views

How can I set path so it can be read from GUI and command line by the same program?

I installed texlive and I want to add it as an environment variable to my Path so that Emacs AucTeX can read it when I start emacs from the GUI or from the command line. So far I've read that emacs ...
bit's user avatar
  • 175
5 votes
1 answer
3k views

why my .xprofile file doesn't work?

I have xorg and xinit and I want to start some commands before the X environment. I did this many times and idk bc doesn't work. I made a touch ~/.xprofile and here I wrote the command that I want to ...
P4Kubz's user avatar
  • 51
5 votes
3 answers
16k views

Error found while loading /home/[username]/.profile

When the system loads it gives the following error: Error found while loading /home/[username]/.profile mesg: ttyname failed: inappropriate ioctl for device As a result the session should not be ...
Hamza Nasim's user avatar
5 votes
1 answer
15k views

How to set environment without sourcing .bash_profile myself every time? [duplicate]

When I restart Ubuntu 14.04, environment variables are set back to default and I have to run source .bash_profile every time which is very annoying. I generally keep my environment vars in ....
quartaela's user avatar
  • 195
5 votes
1 answer
1k views

Can't login after adding script to /etc/profile.d

I have created a little script to add bookmarks in Nautilus to redirect users to network share. If I run the script manually, it works brillantly but as soon as I try to add it in /etc/profile.d, I ...
Patrick Pruneau's user avatar
5 votes
0 answers
2k views

Error found when loading /home/[myusername]/.profile

I get this error each time after logging on: Error found when loading /home/[myusername]/.profile: stty: standard input: Inappropriate ioctl for device As a result the session will not be ...
Blue's user avatar
  • 51
4 votes
2 answers
20k views

"qmake" is not recognized

I have installed Qt 5.6 from the official website via a *.run file. The installation directory is in my home folder. When I run qmake --version I get the following message: qmake: could not exec '/...
Unique's user avatar
  • 175
4 votes
3 answers
7k views

Why won't environment variables added to .profile show up in screen

I'm running Ubuntu 12.04 I added export LD_LIBRARY_PATH=/home/dspies/workspace/hdf5-1.8.11-linux-shared/lib to .profile but when I log in and open terminal and put echo $LD_LIBRARY_PATH there's ...
dspyz's user avatar
  • 570
4 votes
3 answers
2k views

Which bash profile file should I use for each scenario?

I have seen many detailed explanations on how .bashrc, .bash_profile and the various other profile files interact, so I'm not after an explanation of how they fit together (I've read many such ...
YorSubs's user avatar
  • 323
4 votes
1 answer
313 views

How can I configure the steps of font size changes in the terminal?

How can I configure the steps of font size changes in the terminal? I now use 10pt and the next step when using keyboard shortcuts is too big. How can I configure the step size?
don.joey's user avatar
  • 28.8k
4 votes
2 answers
266 views

Something wrong with my `.profile`

I recently installed a few softwares and needed to add their bin/ directories to my PATH. Nothing abnormal so far. But I decided to be smart about it, and rewrote a part of my .profile so I didn't ...
Jonathan H's user avatar
4 votes
1 answer
3k views

run .profile function as cron job

In the .profile file of the root user I have defined a function, e.g. function printDate() { date } I want to run this function every minute and append the output to cron.log. I tried adding the ...
Dónal's user avatar
  • 455
4 votes
1 answer
238 views

App installed in ~/usr launches from terminal but not Applications menu (or why does setting ld_library_path in .profile not work as it should)

I have built and installed an application under a directory of my choosing, let's say under /home/jim/usr, so files have been put in three-four folders, all under this $HOME/usr folder (e.g., bin, ...
levesque's user avatar
  • 4,452
4 votes
1 answer
576 views

Function inside .profile results in no log-in

I've created a custom function in my .profile, and I've added right at the bottom, after my custom aliases : # custom functions function eclipse-gtk { cd ~/development/eclipse-juno ./...
bioShark's user avatar
  • 4,251
3 votes
1 answer
4k views

What are the dangers of sourcing ~/.profile from ~/.bashrc? [closed]

I see many people do the opposite. Are there any reasons why it is a bad idea to source ~/.profile from ~/.bashrc? # .bashrc if [ -f ~/.profile ]; then source ~/.profile fi I've done a lot of ...
user34295's user avatar
  • 141
3 votes
2 answers
13k views

repair ~./profile file

I just messed up with ~/.profile, tried to add something to PATH, but looks like there was a syntax error in my code and now the login screen functionality won't work and I can use ctrlshiftf1 tty to ...
moein rahimi's user avatar
3 votes
3 answers
6k views

Problem in .bashrc

I try to edit .bashrc to view the C-compilers that I installed before. But after opening the new terminal I am stuck with strange error. I am unable to ls the files/directories and nothing works. It ...
HASSAN's user avatar
  • 33

1
2 3 4 5