当前位置: 首页 > news >正文

linux小笔记

1.

安装go并设置环境变量

Add /usr/local/go/bin to the PATH environment variable. You can do this by adding this line to your /etc/profile(for a system-wide installation) or $HOME/.profile:

export PATH=$PATH:/usr/local/go/bin

Note: changes made to a profile file may not apply until the next time you log into your computer. To apply the changes immediately, just run the shell commands directly or execute them from the profile using a command such as source $HOME/.profile.

=======================================================

First, set Go’s root value, which tells Go where to look for its files.

sudo nano ~/.profile

At the end of the file, add this line:

export PATH=$PATH:/usr/local/go/bin

If you chose an alternate installation location for Go, add these lines instead to the same file. This example shows the commands if Go is installed in your home directory:

export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin

With the appropriate line pasted into your profile, save and close the file. Next, refresh your profile by running:

source ~/.profile

============================设置完记得重启(重新登陆)!!!===================================

go语言下载和安装和校验 官方链接:

https://golang.org/doc/install?download=go1.10.3.linux-amd64.tar.gz

转载于:https://www.cnblogs.com/x-poior/p/9416730.html

相关文章:

  • Node——前端权限设计与后端权限设计
  • css3 display:box 属性
  • 乐观锁与悲观锁
  • NOIP2017提高组Day2第一题
  • C++ system函数学习(转)
  • Java IO简介
  • python全栈脱产第9天------定义函数的形式、调用函数的形式、函数的返回值、函数参数...
  • SVG和canvas的区别
  • PL/SQL程序设计(二)—— PL/SQL块结构和组成元素
  • day24 面向对象设计part1
  • 无监督学习:Deep Auto-encoder(深度自动编码器)
  • UVALive 4108 - SKYLINE(线段树区间更新)
  • PDO和MySQLi区别和数度;到底用哪个?
  • android 换行符(\n) 在TextView中显示不正常的问题
  • App上线-Missing App Store Icon
  • 【159天】尚学堂高琪Java300集视频精华笔记(128)
  • - C#编程大幅提高OUTLOOK的邮件搜索能力!
  • gcc介绍及安装
  • JavaScript 奇技淫巧
  • JavaScript 事件——“事件类型”中“HTML5事件”的注意要点
  • javascript 总结(常用工具类的封装)
  • JDK 6和JDK 7中的substring()方法
  • JS实现简单的MVC模式开发小游戏
  • PhantomJS 安装
  • 从伪并行的 Python 多线程说起
  • 规范化安全开发 KOA 手脚架
  • 快速体验 Sentinel 集群限流功能,只需简单几步
  • 跳前端坑前,先看看这个!!
  • 移动端唤起键盘时取消position:fixed定位
  • 湖北分布式智能数据采集方法有哪些?
  • 交换综合实验一
  • ​ 无限可能性的探索:Amazon Lightsail轻量应用服务器引领数字化时代创新发展
  • #pragma预处理命令
  • #QT(一种朴素的计算器实现方法)
  • $.ajax()
  • $.ajax中的eval及dataType
  • (07)Hive——窗口函数详解
  • (13)Hive调优——动态分区导致的小文件问题
  • (52)只出现一次的数字III
  • (Matlab)遗传算法优化的BP神经网络实现回归预测
  • (Note)C++中的继承方式
  • (poj1.3.2)1791(构造法模拟)
  • (Redis使用系列) Springboot 使用redis的List数据结构实现简单的排队功能场景 九
  • (ZT)北大教授朱青生给学生的一封信:大学,更是一个科学的保证
  • (顶刊)一个基于分类代理模型的超多目标优化算法
  • (附源码)ssm经济信息门户网站 毕业设计 141634
  • (六)c52学习之旅-独立按键
  • (算法)Travel Information Center
  • (学习日记)2024.04.10:UCOSIII第三十八节:事件实验
  • (转)ORM
  • (转)大型网站架构演变和知识体系
  • *上位机的定义
  • . ./ bash dash source 这五种执行shell脚本方式 区别
  • .bat批处理(九):替换带有等号=的字符串的子串
  • .NET DataGridView数据绑定说明