← クエスト一覧へ

Linux基礎 ガイドブック

🏠

エラー解決

1 記事
1
Linuxコマンドでよくあるエラーと解決法
❌ Permission denied(権限エラー)
$ chmod 600 /etc/hosts
chmod: changing permissions of '/etc/hosts': Permission denied

✅ 管理者権限が必要な操作は sudo をつける: sudo chmod 600 /etc/hosts

❌ No such file or directory
$ cd /home/usr   # user のスペルミス

✅ パスのスペルを確認。ls で現在地のファイル一覧を確認する。タブキーで補完もできる。

❌ Command not found
$ pyton script.py  # python のスペルミス

✅ コマンド名のスペルを確認。インストールが必要な場合は apt install コマンド名 でインストールする。