Linux下怎么安装goland

2023-05-17,

这篇文章主要介绍Linux下怎么安装goland,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

1 下载

下载GoLand

2 安装Goland

1.解压并重命名目录
~$ tar -zxvf goland-2019.1.3.tar.gz  -C /usr/local
~$ sudo mv /usr/local/GoLand-2019.1.3/ /usr/local/GoLand
~$ ll /usr/local/
total 48
drwxr-xr-x 12 root root 4096 7月  23 17:08 ./
drwxr-xr-x 10 root root 4096 2月  10 08:12 ../
drwxr-xr-x  2 root root 4096 2月  10 08:12 bin/
drwxr-xr-x  2 root root 4096 2月  10 08:12 etc/
drwxr-xr-x  2 root root 4096 2月  10 08:12 games/
drwxr-xr-x 10 root root 4096 7月   9 05:29 go/
drwxr-xr-x  8 root root 4096 7月  23 17:06 GoLand/
drwxr-xr-x  2 root root 4096 2月  10 08:12 include/
drwxr-xr-x  3 root root 4096 6月  30 00:32 lib/
lrwxrwxrwx  1 root root    9 6月  29 23:43 man -> share/man/
drwxr-xr-x  2 root root 4096 2月  10 08:12 sbin/
drwxr-xr-x  6 root root 4096 2月  10 08:15 share/
drwxr-xr-x  2 root root 4096 2月  10 08:12 src/
1234567891011121314151617
配置为全局启动

将GoLand的启动脚本goland.sh加入用户的/usr/bin/目录下,可以在任意位置执行goland.sh启动GoLand IDE。

~$ cd /usr/local/GoLand/bin/
~$ sudo ln -s $(pwd)/goland.sh /usr/bin/goland.sh
12
配置启动命令别名并独立运行

按照步骤2中的方式启动GoLand之后,必须保持启动GoLand的terminal保持active,否则GoLand也会随之退出。因此,通过重命名alias的方式简化启动命令,并独立运行(不随terminal关闭而退出)。 打开.bashrc并定义别名:

~$ vim .bashrc
...
alias goland='nohup goland.sh & >/dev/null'
123

然后重新打开一个terminal,直接输入goland回车即可启动。

以上是“Linux下怎么安装goland”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注本站行业资讯频道!

《Linux下怎么安装goland.doc》

下载本文的Word格式文档,以方便收藏与打印。