分页: 1 / 1

[建议]贴出自己的.profile

发表于 : 2007-02-09 1:42
taker2001
我在这里建议大家贴出自己的.profile来分享交流一下,简单说说这个.profile是如何促进工作的?

发表于 : 2007-04-06 16:56
ziyun
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "$PS1" ]; then
if [ "$BASH" ]; then
PS1='[\u@\h \W]\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
JAVA_HOME=/usr/local/jdk
JRE_HOME=/usr/local/jre
CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export JAVA_HOME JRE_HOME CLASSPATH
umask 022

发表于 : 2007-05-12 16:23
shuhill
小菜菜弱弱的问一下. profile 是干啥的.

新手,刚学Linux几天.

发表于 : 2007-05-12 16:25
BigSnake.NET
shuhill 写了:小菜菜弱弱的问一下. profile 是干啥的.

新手,刚学Linux几天.
bash启动脚本

发表于 : 2007-06-21 15:00
jimmy8848
俺的:

代码: 全选

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f ~/.bashrc ]; then
	. ~/.bashrc
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
    PATH=~/bin:"${PATH}"
fi

JAVA_HOME=/usr/lib/jvm/java-6-sun
CATALINA_HOME=/home/jimmy/develop/tomcat
JBOSS_HOME=/home/jimmy/develop/jboss
ANT_HOME=/home/home/jimmy/develop/ant
PATH=${PATH}:$JAVA_HOME/bin:$CATALINA_HOME/bin:$JBOSS_HOME/bin:$ANT_HOME/bin
CLASSPATH=.:$JAVA_HOME/lib

export JAVA_HOME CATALINA_HOME JBOSS_HOME ANT_HOME PATH CLASSPATH

发表于 : 2007-07-04 12:34
kenwu
一点意思都没有, 环境变量不应该跟机器耦合!
如果我把服务器移到另一台机器上,难道我还要再同样配置一遍吗?
我认为, 这些变量应该配置在tomcat启动脚本里!

发表于 : 2007-07-06 16:25
duanyong
kenwu 写了:一点意思都没有, 环境变量不应该跟机器耦合!
如果我把服务器移到另一台机器上,难道我还要再同样配置一遍吗?
我认为, 这些变量应该配置在tomcat启动脚本里!

代码: 全选

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f ~/.bashrc ]; then
        . ~/.bashrc
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
    PATH=~/bin:"${PATH}"
fi

奇怪,这是我们老大配置的。。没有设置java环境变量,怎么

代码: 全选

ubuntu@sonoro-dev-00:~$ javac -version
javac 1.6.0_01
[/code]

发表于 : 2007-07-12 8:35
alex_kame
BigSnake.NET 写了:
shuhill 写了:小菜菜弱弱的问一下. profile 是干啥的.

新手,刚学Linux几天.
bash启动脚本
找个Linux做女朋友,哈哈!那个版本的Linux最漂亮,就找那个,呵呵!

我的

发表于 : 2007-08-17 13:03
amagle
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "$PS1" ]; then
if [ "$BASH" ]; then
PS1='\u@\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi

umask 022


我的好怪啊,和你们的怎么差那么多啊

发表于 : 2007-08-27 21:25
qianjigui

代码: 全选

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f ~/.bashrc ]; then
	. ~/.bashrc
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
    PATH=~/bin:"${PATH}"
fi

#########################Install all useful tools###################
PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
export PATH
####################################################################

#######################JAVA path####################################
JAVA_HOME=/usr/local/java/jdk1.5.0_09
export JAVA_HOME
PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
export PATH
CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export CLASSPATH
####################################################################

Re:

发表于 : 2009-08-28 8:58
sailingburg
ziyun 写了:# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "$PS1" ]; then
if [ "$BASH" ]; then
PS1='[\u@\h \W]\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
JAVA_HOME=/usr/local/jdk
JRE_HOME=/usr/local/jre
CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib
export JAVA_HOME JRE_HOME CLASSPATH
umask 022
我是菜鸟,什么都不懂,勇敢的问一下:
这是些什么语言呢?是shell么(其实Shell是什么我也不知道)
还有,CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib 这行命令是什么意思?“:”和“$”是什么意思?