一个在 Linux 终端中输出彩虹特效的命令行工具 -lolcat

1)下载ruby并安装

#wget http://www.mrliangqi.com/pack/ruby-2.1.4.tar.gz

#tar xf ruby-2.1.4.tar.gz

#./configure   --prefix=/usr/local/ruby && make &&make install

安装完成之后修改系统的PATH路径:

# vim /etc/profile.d/ruby.sh

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

# . /etc/profile.d/ruby.sh 使其生效

#ruby -v 查看安装好的ruby版本

2)下载安装rubygem

rubygems是ruby的在线包管理工具,类似yum和apt-get可以从rubyforge下载。

# wget www.mrliangqi.com/pack/rubygems-2.4.1.tgz

#tar xf rubygems-2.4.1.tgz

# ruby setup.rb 使用ruby命令进行安装

3)下载并安装lolcat

#wget http://www.mrliangqi.com/pack/master.zip

# unzip master.zip

# gem source --remove https://rubygems.org/

https://rubygems.org/ removed from sources

# gem sources -a https://ruby.taobao.org/

https://ruby.taobao.org/ added to sources

# gem sources -l

*** CURRENT SOURCES ***

https://ruby.taobao.org/

# gem install lolcat

4)测试

[root@Aliyun /]# ls -lh | lolcat


发表评论

登录 后发表评论.