2022年11月9日水曜日

ラズパイにUbuntu desktop 22.04を入れてみた

 


以下備忘録です。


Raspberry Pi 4 model B 8GB(以下ラズパイ4)にUbuntu Desktop 22.04を入れてみたとき感じたことを列挙する

筆者はLinuxはほぼほぼ初心者な上に、仕事でもSEやプログラマーをしているのではなくPCには程遠いガテン系である
どっちかというとアーク溶接とかガス切断のほうが得意である

intel、AMDのCPUとはアーキテクチャが違う

そもそもできることでできないことがある

そこで感じたことはまずubuntuを入れたからってx64系CPUとARM系CPUではアーキテクチャの違いによりインストールできないアプリがあった

ラズパイ4でインストールや実行できなかったアプリ
・Google chrome
・Minecraft BE server


2022年11月7日月曜日

ubuntuでグラボ




以下備忘録です

勉強も兼ねて基本コマンドの説明も書いているためわかっている人にはウザいです


2022年11月3日木曜日

sambaでファイル共有




以下備忘録です。


パッケージ一覧を更新

user@computer:~$ sudo apt update

パッケージを更新

user@computer:~$ sudo apt upgrade

sambaパッケージをインストール

user@computer:~$ sudo apt install samba

sambaにユーザーを追加
但しubuntuにいるユーザーでないとダメ
パスワードを促されるがここはsamba専用

user@computer:~$ sudo pdbedit -a sambauser

共有用のディレクトリを作る

user@computer:~$ mkdir /home/share

ここで特定ユーザーの階層に作ってはアクセスできない
/home/user/shareではダメ

ディレクトリのアクセス権を設定
777はフルアクセス可

user@computer:~$ sudo chmod 777 /home/share

◆各種設定

現在のIPアドレスを調べる

user@computer:~$ ip address show

sambaのサーバー設定ファイルを書き換える

user@computer:~$ sudo nano /etc/samba/smb.conf

以下設定ファイルの書き換え

[global]
dos charset = CP932
unix charset = UTF-8
◆追記部分
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP
◆必要があれば書き換える
#### Networking ####
# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
interfaces = 192.168.XX.XX/24 XXXX
◆行の初めについていたセミコロンを消す
◆127.0.0.0/8となっていた部分をネットワークアドレスに書き換える
# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself. However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
bind interfaces only = yes
◆行の初めについていたセミコロンを消す
map to guest = bad User
◆追記部分
[share]
path = /home/share
writeable = yes
guest ok = yes
guest only = yes
create mode = 0777
directory mode = 0777
◆追記部分
[usb-media]
path = /media
writable = yes
guest ok = yes
read only = no
guest only =
yes
create mode = 0777
directory mode = 0777
force user = smb-share
◆USBのSSDをシェア

smb.confの記述が間違っていないか確認

user@computer:~$ testparm

Loaded services file OK.と出れば問題なし

sambaの設定を読み込む(sambaの再起動)

user@computer:~$ sudo systemctl restart smbd nmbd

sambaの自動起動を指定

user@computer:~$ sudo systemctl enable smbd nmbd