求助如何设置环境变量?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
fydapg
帖子: 25
注册时间: 2008-01-05 21:24

求助如何设置环境变量?

#1

帖子 fydapg » 2008-01-15 14:01

下面为说明书上环境变量设置说明,但看不懂:
Setting Environment Variables

The path to the MouseAtlas software needs to be set for the PATH variable.

For example, if the path is the default /opt/MouseAtlas/bin:-

For sh, ksh, bash shell add these lines to your .profile file

PATH=($PATH:/opt/MouseAtlas/bin)

export $PATH

For csh add this line to your .cshrc file.

set path = ($path /opt/MouseAtlas/bin)

For tcsh add the same line to your .tcshrc file.

set path = ($path /opt/MouseAtlas/bin)

Remember to restart any terminal sessions to pick up the new path.

Testing The Installation

If the above steps have been carried out successfully, you will now be able to start the software from the command line.

The "MAPaint" program should start like the example screen shot below.







请问说明书上的环境变量如何设的。我已经运行到这步了,前面的解压我会了,没写上去了。下面是终端显示:
fs@fs-laptop:~$ cd /home/fs/Linux
fs@fs-laptop:~/Linux$ sudo ./setupMA.ksh
Press return to install in default directory /opt/MouseAtlas
Or enter an installation directory [/opt/MouseAtlas]: 这步我是按回车键的,没错吧
Installing in /opt/MouseAtlas
/opt/MouseAtlas already exists
/opt/MouseAtlas already contains these files:
bin
Do you want to overwrite these? [y/n](n) y
Copying files
Finished MouseAtlas Installation

****IMPORTANT****
To automatically use the software you will need to set your PATH variable

For sh, ksh, bash shell add these lines to .profile
PATH=($PATH:/opt/MouseAtlas/bin)
export $PATH

For csh, tcsh add this line to .cshrc or .tcshrc
set path = ($path /opt/MouseAtlas/bin)

fs@fs-laptop:~/Linux$ 下面该怎么输入?请写一下详细步骤。
zpq2004
帖子: 26
注册时间: 2008-01-09 11:23

#2

帖子 zpq2004 » 2008-01-15 14:10

如果是ubuntu的话,
就在终端下输入命令
cd
sudo vi .profile
在PATH最后加上:/opt/MouseAtlas/bin
保存
重启
头像
yiding_he
帖子: 2677
注册时间: 2006-10-25 18:10
来自: 长沙
联系:

#3

帖子 yiding_he » 2008-01-15 14:11

vi 用不惯的话就直接:

代码: 全选

gedit ~/.profile
你是自由的。别人也是。
fydapg
帖子: 25
注册时间: 2008-01-05 21:24

#4

帖子 fydapg » 2008-01-15 16:24

我用的是ubuntu,请写详细点好吗?
头像
yaoms
帖子: 4952
注册时间: 2007-10-19 14:51
来自: 深圳

#5

帖子 yaoms » 2008-01-15 17:25

快捷键 alt+F2
在 弹出的框中输入 gedit 然后回车

然后找到这行:
PATH=~/bin:"${PATH}"
改成
PATH=~/bin:"${PATH}":/opt/MouseAtlas/bin

保存退出。
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'
fydapg
帖子: 25
注册时间: 2008-01-05 21:24

#6

帖子 fydapg » 2008-01-17 13:04

那么执行这个软件改用什么命令呢?
mxd271966940
帖子: 46
注册时间: 2007-12-27 20:50

#7

帖子 mxd271966940 » 2008-06-26 19:22

yaoms 写了:快捷键 alt+F2
在 弹出的框中输入 gedit 然后回车

然后找到这行:
PATH=~/bin:"${PATH}"
改成
PATH=~/bin:"${PATH}":/opt/MouseAtlas/bin

保存退出。
但是现在8.04里面没有PATH变量了
回复