Mac#

homebrew#

パッケージ管理はhomebrewを使う.MacTeXはghostscriptをいろいろなディレクトリにばら撒くのでhome brew でtexliveをinstallする.

仮想マシン#

授業資料を作成する際に暫しクリーンな環境が欲しいのでmacOSを動かす仮想マシンはtartを使う. tartのインストール方法やmacOSのイメージは https://tart.run/quick-start/ を参考にする.

% tart list
Source Name                                                                                                        Disk Size Accessed State
local  tahoe-base                                                                                                  50   32   1 か月前    stopped
OCI    ghcr.io/cirruslabs/macos-tahoe-base:latest                                                                  50   32   2 か月前    stopped
OCI    ghcr.io/cirruslabs/macos-tahoe-base@sha256:f883f13f3f076ee2aa97f92a7341801f83655037dcfecd184872574d5664cbde 50   32   2 か月前    stopped
% tart run tahoe-base

別のターミナルでtartにsshで接続する場合は次で可能.

% ssh admin@$(tart ip <VMname>) # 上の場合,VMnameはtahoe-base

ここでユーザ名:パスワードはいずれも admin. ファイル転送はscpで以下のようにすれば送れる.

 % scp -r <filepath>  admin@$(tart ip <VMname>):~/Desktop/

以下のようにdirオプションをつければ,ホスト側の適当なディレクトリをVM上の/Volumesにマウントできる.

tart run --dir=project:/<host-dir> <VMname>