• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

What is the purpose of .bash_profile file under User Home Directory In Linux

by admin

What is the purpose of ~/.bash_profile file

Apart from having a home directory to create and store files, users need an environment that gives them access to the tools and resources. When a user logs in to a system, the user’s work environment is determined by the initialization files. These initialization files are defined by the user’s startup shell, which can vary depending on the release. The default initialization files in your home directory enable you to customize your working environment.

Below are Various Initialization file for Bash Shell

  • The /etc/profile file is a systemwide file that the system administrator maintains. This file defines tasks that the shell executes for every user who logs in. The instructions in the file usually set the shell variables, such as PATH, USER, and HOSTNAME.
  • The ~/.bash_profile file is a configuration file for configuring user environments. The users can modify the default settings and add any extra configurations in it.
  • The ~/.bash_login file contains specific settings that are executed when a user logs in to the system.
  • The file is yet another configuration file that is read in the absence of the ~/.bash_profile and ~/.bash_login files.
  • The ~/.bash_logout file contains instructions for the logout procedure.

Configuring the .bash_profile File

The .bash_profile file is a personal initialization file for configuring the user environment. The file is defined in your home directory and can be used for the following:

  • Modifying your working environment by setting custom environment variables and terminal settings
  • Instructing the system to initiate applications

Filed Under: Linux, Shell Scripting

Some more articles you might also be interested in …

  1. Linux / UNIX : How to find files which has SUID/SGID set
  2. How to Set a Custom Interface Name with NetworkManager in CentOS/RHEL 7
  3. CentOS / RHEL : anacron basics (What is anacron and how to configure it)
  4. How to allow all traffic from a server using firewalld in CentOS/RHEL
  5. runlevel Command Examples in Linux
  6. env Command Examples in Linux
  7. lvscan Command Examples in Linux
  8. Understanding dm-Multipath Identifiers in Linux
  9. How to enable the automatic extension for a thin LVM volume
  10. TCP Wrapper (hosts.allow & hosts.deny) Command Options in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • qemu-system-x86_64: command not found
  • timedatectl: command not found
  • mpirun.openmpi: command not found
  • startkde: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright