Linux下profile和bashrc区别1./etc/profile
用来设置系统环境参数,比如$PATH. 这里面的环境变量是对系统内所有用户生效的。2./etc/bashrc
这个文件设置系统bash shell相关的东西,对系统内所有用户生效。只要用户运行bash命令,那么这里面的东西就在起作用。3.~/.bash_profile
用来设置一些环境变量,功能和/etc/profile 类            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2024-05-19 07:53:13
                            
                                401阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            You can setup files that automatically configure your working environment    every time you login. The three major configuration files for the bash sh- generic ...            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2023-04-20 00:32:40
                            
                                70阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            以下是读《Linux命令行与shell脚本编程大全》第三章后,觉得有用的内容。1./etc/passwd文件该文件包含了所有系统用户账户列表及每个用户的基本配置信息,如下图所示:   每个条目有七个字段,字段之间使用冒号分隔,这些字段包括:  •用户名  •用户密码(若密码在其他位置,则该位是一个占位符)  •用户的系统UID  •用户的系统GID  •用户的全名  •用户的默认主目录  •用户的            
                
         
            
            
            
            Some interesting excerpts from the bash manpage:When bash is invoked as an interactivelogin shell, or as a non-interactive shell with the--loginoption, it first reads and executes commands from the file/etc/profile, if that file exists. After reading that file, it looks for~/.bash_profile,~/.bash_lo            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2013-12-09 10:12:00
                            
                                223阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            每个用户都可使用 ~/.bash_profile 文件输入专用于自己使用的 shell 信息,~ 表示用户的家目录,如 root 用户就是 /root/.bash_profile当用户登录 shell 时就执行该文件,该文件仅仅执行一次,默认情况下,该文件设置一些环境变量,执行用户的 .bashrc            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2019-02-01 10:06:00
                            
                                806阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            .bash_profile 是用户登陆时的环境变量,如PATH等,的设置文件。当用户login s            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2023-04-14 19:43:53
                            
                                165阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            /home/oracle  隐藏文件.bash_profile# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then    . ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/b            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2016-04-01 19:50:15
                            
                                688阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            # .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$H            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2010-12-10 10:56:34
                            
                                1943阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            Linux操作系统是一种常见的操作系统,广泛应用于服务器和个人电脑中。其中,Bash(GNU Bourne-Again Shell)是Linux下常用的命令行Shell。在Linux系统中,用户可以通过编辑bash profile文件来定制自己的命令行环境。
bash profile是一个用来保存用户个性化设置和命令别名等配置信息的文件。在Linux系统中,每个用户都有一个对应的bash pro            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2024-03-04 13:52:00
                            
                                51阅读
                            
                                                                             
                 
                
                             
         
            
            
            
                                        
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2022-09-20 20:19:45
                            
                                243阅读
                            
                                                                             
                 
                
                                
                     
                                    
                             
         
            
            
            
            login 方式:: su - oracle 依次 /etc/bash.bashrc———— /home/$user/.bashrc ———— /ect/profile	———— /home/$user/.bash_profile(找不到~/.bash_profile, 则寻找~/.bash_l...            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2021-08-11 14:34:46
                            
                                651阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            profile,bashrc,.bash_profile,.bash_login,.profile,.bashrc,.bash_logout浅析 Part 2 by:授客 QQ:1033553122 接Part 1 B. 当bash以interactive shell方式启动时: 如果存在~/.ba            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2021-06-06 01:21:18
                            
                                936阅读
                            
                                                                             
                 
                
                             
         
            
            
            
             一、知识点归纳1.配置文件关系/etc/*和~/.*区别:/etc/profile,/etc/bashrc 是系统全局环境变量设定~/.profile,~/.bashrc(有的发行版上为“~/.bash_profile”)是用户家目录下的私有环境变量设定~/.profile与~/.bashrc的区别:都具有个性化定制功能~/.profile可以设定本用户专有的路径,环境变量等,它只在登            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2024-01-08 14:03:15
                            
                                105阅读
                            
                                                                             
                 
                
                                
                     
                                    
                             
         
            
            
            
            先要配置jdk步骤大概如下先解压Hadoop的安装包,然后在 .bash_profile文件中进行修改该安装包的环境变量目录。(.bash_profile是最重要的一个配置文件,它在用户每次登录系统时被读取,里面的所有命令都会被bash执行)同时将相应的bin也加入到path中。然后就是对一些核心文件进行配置。配置这些文件后,格式化namenode,然后就可以启动集群了。启动完后,基本也就完成了。            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2023-09-14 13:06:43
                            
                                65阅读
                            
                                                                             
                 
                
                                
                     
                                    
                             
         
            
            
            
            今天有一同事安装了ORACLE后,在切换账号时遇到错误提示“-bash: .bash_profile: command not found”。如下所示 [root@GLETestLinux ~]# su - oracle-bash: .bash_profile: command not found[oracle@GLETestLinux ~]$            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2021-08-23 09:48:34
                            
                                793阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            在Linux操作系统中,`.bash_profile`是一个非常重要的文件,它用来配置用户的个性化环境。在Linux系统中,每个用户在登录后都会运行这个文件,以初始化用户的个性化环境设置。
`.bash_profile`文件通常位于用户的home目录下,它是一个隐藏文件,可以使用ls -a命令来查看。当用户登录系统时,bash shell会先执行`.bash_profile`文件,然后再执行`.            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2024-04-22 10:58:43
                            
                                150阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            在Linux系统中,用户可以通过.bash_profile文件来定制自己的命令行环境。这个文件位于用户的家目录下,是一个隐藏文件,可以使用文本编辑器来打开和编辑。在这篇文章中,我们将讨论.bash_profile文件的作用和如何进行相关的配置。
.bash_profile文件是用户登录时会自动执行的脚本文件,可以在其中设置一些用户自定义的环境变量、别名、函数等。用户可以根据自己的需求来配置这个文            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2024-04-24 10:00:59
                            
                                123阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            /etc/profile 为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行,并从/etc/profile.d目录的配置文件中搜集shell的设置,etc/profile中设定的变量的可以作用于任何用户,而~/.bashrc等中设定的变量只能继承/etc/profile中的            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2022-01-04 15:32:00
                            
                                304阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            [oracle@redhat4 ~]$ vi .bash_profile # .bash_profile # Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrcfi # User specific environment and startup programs PATH=$PATH:$HOME/bin...            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2021-07-21 11:43:53
                            
                                547阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            因为该文件"~/.bash_profile"是在每次登陆时才读取,因此需要重启才能生效            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2022-02-24 17:57:23
                            
                                293阅读