Debian

/dev/ttyUSB0をユーザーが使えるようにする

デバイスのアクセス権はdialoutグループに所属するユーザー $ ls -l /dev/ttyUSB0 crw-rw---- 1 root dialout 188, 0 12月 6 14:11 /dev/ttyUSB0 自分(zumaa)のグループを確認、所属してない $ id -a uid=1000(zumaa) gid=1000(zumaa) groups=1000(zumaa),24…

Debian/Raspbianのバージョン情報

Linuxの情報 $ uname -a Linux raspberrypi 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux Debian/Raspbianのバージョン $ cat /etc/debian_version 10.13 $ cat /etc/issue Raspbian GNU/Linux 10 \n \l ディストリビューション情…

warning: implicit declaration of function ‘i2c_smbus_write_byte_data’

とあるi2cを使うcコードでコンパイル警告とリンクエラーが出た。 コンパイル警告 warning: implicit declaration of function ‘i2c_smbus_write_byte_data’ warning: implicit declaration of function ‘i2c_smbus_read_byte’ リンクエラー undefined refere…

特定ユーザーでsudoを使えるようにする

(Debian 10 busterで確認) //rootに移行 $ su rootのパスワード //sudoを入れる # apt-get install sudo //特定ユーザーを追加する # visudo > ユーザー名 ALL=(ALL:ALL) ALL ctrl+x で保存 //使えるよになったか確認する # exit $ sudo -v