1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 如何设置ubuntu的PATH环境变量

如何设置ubuntu的PATH环境变量

时间:2019-12-05 23:12:43

相关推荐

如何设置ubuntu的PATH环境变量

sudo gedit ~/.profile

在该文件最后加上

export PATH=/usr/local/cuda-7.5/bin:$PATH

# ~/.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; for setting the umask# for ssh logins, install and configure the libpam-umask package.#umask 022# if running bashif [ -n "$BASH_VERSION" ]; then# include .bashrc if it existsif [ -f "$HOME/.bashrc" ]; then. "$HOME/.bashrc"fifi# set PATH so it includes user's private bin if it existsif [ -d "$HOME/bin" ] ; thenPATH="$HOME/bin:$PATH"fiexport PATH=/usr/local/cuda-7.5/bin:$PATH

Note:The code in~/.profileis run after~/.pam_environmenthas been read. That makes~/.profilesuitable to use if you want to override a locale related variable that was set in~/.pam_environmentvia e.g. Language Support.

关于环境变量的详情可以查看:/community/EnvironmentVariables

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。