Solved

Bash Shell

Posted on 2014-09-07
11
401 Views
Last Modified: 2014-12-06
Hi,

I am using Debian Linux, but am unable to locate .bash_profile.  Where is this stored in the OS?  ALso, how can you tell which shell is in use?

Thanks
Jack
0
Comment
Question by:Jack_son_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +3
11 Comments
 
LVL 23

Assisted Solution

by:savone
savone earned 125 total points
ID: 40309048
There are two, one is usually in your home directory and the other in /etc

You can find them with this command:

find / -name ".bash_profile"
0
 

Author Comment

by:Jack_son_
ID: 40309059
no results come back from the search
0
 
LVL 78

Assisted Solution

by:arnold
arnold earned 375 total points
ID: 40309062
Usually, in /etc/skel
This is the directory used when adding a new user with the -m -k /etc/skel

ls -la ~/

To confirm, your user's shell is bash.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Jack_son_
ID: 40309077
okay, i see these items here:

drwxr-xr-x   2 root root 4096 Feb 19  2013 .
drwxr-xr-x 102 root root 4096 Aug 21 00:15 ..
-rw-r--r--   1 root root  220 Dec 30  2012 .bash_logout
-rw-r--r--   1 root root 3392 Dec 30  2012 .bashrc
-rw-r--r--   1 root root  675 Dec 30  2012 .profile

is it one of the last 2?
0
 
LVL 78

Assisted Solution

by:arnold
arnold earned 375 total points
ID: 40309104
.bash_profile is not a requirement.
None of these files are required.
They are often setup by admins to assist the users such that commands are in the search path as well as have some standardized settings.
Depending on the admin, they could have a centralized in /etc while the files within the skel directory reference the central config.

What in particular are you trying to achieve?
0
 
LVL 48

Expert Comment

by:Tintin
ID: 40309167
As Arnold has mentioned, the .bash files are optional.

Typically, you'd put your aliases and other settings in .bashrc
0
 
LVL 62

Expert Comment

by:gheist
ID: 40309595
.profile is used if no .bash_profile is present.
0
 

Author Comment

by:Jack_son_
ID: 40309643
Okay, i will try .profile.  I am trying to set Java Home.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40309659
Generally you should not, as system-supplied java is found automatically by TOMCAT etc.
0
 
LVL 78

Accepted Solution

by:
arnold earned 375 total points
ID: 40310387
/etc/Profile
Also look at sshd service which is presumably the means by which users connect in.
If as gheist pointed out, this relates to anapp, adding the definitions of java_home in the service start script should resolve this issue.
0
 

Expert Comment

by:Vinu Philip
ID: 40485214
echo $SHELL would tell you which shell is in use
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question