LoginSignup
1
1

More than 3 years have passed since last update.

LinuxでURLのQRコードを作成する

Posted at

自分のホームページやサイトなどのURLをQRコードに作成する方法を説明します。

LinuxシェルからQRコードを生成する

対象URLは「 https://fx.askbox.net 」と出力画像ファイルは「 askbox.net.png 」とします。

$ qrencode "https://fx.askbox.net" -o askbox.net.png

作成されたのQRコードの結果

https://fx.askbox.netのQRコード

Ubuntuにqrencodeをインストール

$ sudo apt install qrencode

archlinuxにqrencodeをインストール

$ sudo pacman -S qrencode

Ubuntuのバージョンの確認

$ uname -a
Linux meme_test 4.15.0-88-generic #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:        18.04
Codename:       bionic

archlinuxのバージョンの確認

$ uname -a
Linux arch.local 5.6.11-arch1-1 #1 SMP PREEMPT Wed, 06 May 2020 17:32:37 +0000 x86_64 GNU/Linux

$ lsb_release -a
LSB Version:    1.4
Distributor ID: Arch
Description:    Arch Linux
Release:    rolling
Codename:   n/a
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1