2
使用 lsix 让 Linux 命令行显示图片
source link: https://blog.kelu.org/tech/2023/08/04/displaying-images-in-the-linux-command-line.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
在服务器上存了一些图片,没有预览比较麻烦。
要能在命令行下预览,需要一个前提条件是终端支持 Sixel Graphics。像我使用 iTerm2、服务端预览没有问题。但如果进入 tmux 之后,就不行了。
-
安装 ImageMagick
Ubuntu/Debian
sudo apt-get install imagemagick
macOS
brew install imagemagick
-
安装 lsix
wget https://raw.githubusercontent.com/hackerb9/lsix/master/lsix sudo mv lsix /usr/local/bin sudo chmod +x /usr/local/bin/lsix
-
lsix
如果终端或者服务端不支持,则会显示如下:
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK