$ apt install ioport
* '''Note:''' Starting from Ubuntu 18.04 direct access to I/O ports from the command line provided by ioport package
sudo apt install ioport** On older Ubuntu versions ioport should be installed manually from:
https://packages.ubuntu.com/bionic/ioport