Solved

Bash Shell

Posted on 2014-09-07
11
386 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_
  • 3
  • 3
  • 2
  • +3
11 Comments
 
LVL 23

Assisted Solution

by:savone
savone earned 125 total points
Comment Utility
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_
Comment Utility
no results come back from the search
0
 
LVL 76

Assisted Solution

by:arnold
arnold earned 375 total points
Comment Utility
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
 

Author Comment

by:Jack_son_
Comment Utility
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 76

Assisted Solution

by:arnold
arnold earned 375 total points
Comment Utility
.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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 48

Expert Comment

by:Tintin
Comment Utility
As Arnold has mentioned, the .bash files are optional.

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

Expert Comment

by:gheist
Comment Utility
.profile is used if no .bash_profile is present.
0
 

Author Comment

by:Jack_son_
Comment Utility
Okay, i will try .profile.  I am trying to set Java Home.
0
 
LVL 61

Expert Comment

by:gheist
Comment Utility
Generally you should not, as system-supplied java is found automatically by TOMCAT etc.
0
 
LVL 76

Accepted Solution

by:
arnold earned 375 total points
Comment Utility
/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
Comment Utility
echo $SHELL would tell you which shell is in use
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

772 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now