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 bash
if [ -n "$BASH_VERSION" ]; then# include .bashrc if it existsif [ -f "$HOME/.bashrc" ]; then. "$HOME/.bashrc"fi
fi# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; thenPATH="$HOME/bin:$PATH"
fiexport PATH=/usr/local/cuda-7.5/bin:$PATH

Note: The code in ~/.profile is run after ~/.pam_environment has been read. That makes ~/.profile suitable to use if you want to override a locale related variable that was set in ~/.pam_environment via e.g. Language Support.

关于环境变量的详情可以查看:https://help.ubuntu.com/community/EnvironmentVariables

如何设置ubuntu的PATH环境变量相关推荐

  1. Ubuntu下增加Python的PATH环境变量

    Ubuntu下增加Python的PATH环境变量 1. Ubuntu专有方式 编辑 /etc/ld.so.conf 文件,如果以下语句不存在,则加入: include /etc/ld.so.conf. ...

  2. PowerShell批量设置PATH环境变量

    PowerShell批量设置PATH环境变量 Code #requires -version 4.0 #requires #-runasadministrator# Get the ID and se ...

  3. ant root环境配置_如何给root用户设置PATH环境变量

    如何给root用户设置PATH环境变量 一.背景 之所以会有这个问题的提出,是因为我在普通用户下编译内核时,提示找不到交叉编译工具链,内核源码是放在根目录下的,判断问题所在是:环境变量对普通用户生效了 ...

  4. Mac 可设置环境变量的位置、查看和添加PATH环境变量

    转:http://elf8848.iteye.com/blog/1582137 Mac 启动加载文件位置(可设置环境变量) -------------------------------------- ...

  5. Path环境变量的理解以及设置MinGW环境变量

    配置path环境变量 在使用MinGW的时候,不小心把path变量的东西全部删掉了,结果只能自己重新设置path变量,首先要知道如何设置path变量. Path路径:用来指定可执行文件的搜索路径,也就 ...

  6. java的三个环境变量是啥_JAVA中常用需要设置的三个环境变量(JAVA_HOME、CLASSPATH、PATH)...

    JAVA中常用需要设置的三个环境变量: JAVA_HOME.CLASSPATH.PATH (一) 配置环境变量:(相对路径) 1. JAVA_HOME=x:/jdk1.6.0 2. 用%JAVA_HO ...

  7. oracle11环境变量path设置_LUENT软件UDF环境变量配置

    原创 一只大本鹅 FLUENT小白进阶之路 今天 大家好,今天是本号第一次更新,欢迎大家踊跃提出批评指正,谢谢大家! 今天从FLUENT软件安装UDF环境变量配置开始说起.(以下采用FLUENT19. ...

  8. Path环境变量是什么?有什么用?怎么工作?JDK,JRE,JVM,集成开发工具是什么?有什么用?怎么工作?JDK安装包文件结构?有必要设置Path环境变量?Eclipse和IDEA开发工具的运作

    简介 ​ 本文主要讲述,Path环境变量是什么?有什么用?怎么工作的?JDK,JRE,JVM,集成开发工具是什么?有什么用?怎么工作的?JDK安装包文件结构?有没有必要设置Path环境变量?Eclip ...

  9. Linux系统默认PATH环境变量的设置

    当系统启动后,想要运行一个程序,大部分情况下我们都是直接使用程序名即可运行,那是因为系统中的PATH环境变量已经添加了程序所在的目录,程序加载器会查找PATH环境变量来确定该程序所在的绝对路径. in ...

最新文章

  1. 《MongoDB权威指南》迷你书连载一-入门篇
  2. gitkraken同步建立repository与github上的repository
  3. 性能测试十九:jmeter参数优化+排错
  4. web程序入门五(http无状态)
  5. 页面加载完时再动态添加脚步
  6. mimo+matlab代码,mimo-matlab代码
  7. __setattr__,__getattr__,__getattribute__
  8. 【Flink】Flink时间之internalTimerService初始化
  9. NVIDIA Tesla K40C 和 AMD Firepro W8100 的对比
  10. Linux集群:LVS搭建负载均衡集群(二)
  11. 解决问题--mysql可以远程通过IP访问,不能通过localhost与127.0.0.1访问
  12. RuntimeError: context has already been set(multiprocessing)
  13. C#移除对象中的属性(model类或集合等)JObject
  14. 九宫格 c语言题目及答案,9X9,九宫格测试,C编程。
  15. layout_marginTop=-3dp导致内容被遮挡的问题处理
  16. 下载编译curaEngine
  17. Python 跨类传参与跨模块传参
  18. 给人脸戴上口罩,Python实战项目来了
  19. 离散数学序关系求解最大/小元,极大/小元,上/下届,上/下确界
  20. Moss 自定义Featur

热门文章

  1. Win10彻底关闭恢复功能、省流量终极设置
  2. 机器视觉光源学习总结——条形光源
  3. Python量化交易基础讲堂-详解随机数的生成
  4. js string转json要注意的地方
  5. 【杂题总汇】HDU-6406 Taotao Picks Apples
  6. 互联网金融网站走马观花
  7. Android自定义类似ProgressDialog效果的Dialog
  8. Xcode 4.6.3 Bug - .m 文件不能正常打开,uitableveiwController
  9. #if、#ifdef、#if defined之间的区别
  10. 事件和委托的编译代码