27. ユーザーとグループとは
• id - print real and effective user and group IDs
• id <username>
• ユーザのIDやそのユーザーが所属するグループを確認できる
28. ユーザーとグループとは
• id - print real and effective user and group IDs
• id ubuntu
uid=1000(ubuntu) gid=1000(ubuntu)
groups=1000(ubuntu),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),
29(audio),30(dip),44(video),46(plugdev),102(netdev)
29. ユーザーとグループとは
• id - print real and effective user and group IDs
• id ubuntu
uid=1000(ubuntu) gid=1000(ubuntu)
groups=1000(ubuntu),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),
29(audio),30(dip),44(video),46(plugdev),102(netdev)
ユーザー メイングループ
30. ユーザーとグループとは
• id - print real and effective user and group IDs
• id ubuntu
uid=1000(ubuntu) gid=1000(ubuntu)
groups=1000(ubuntu),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),
29(audio),30(dip),44(video),46(plugdev),102(netdev)
所属グループ
31. 基本コマンドを覚えよう
• ls - list directory contents
• ls -alh ~
total 28K
drwxr-xr-x 4 ubuntu ubuntu 4.0K Aug 14 15:41 .
drwxr-xr-x 3 root root 4.0K Aug 14 15:33 ..
-rw-r--r-- 1 ubuntu ubuntu 220 Apr 9 01:03 .bash_logout
-rw-r--r-- 1 ubuntu ubuntu 3.6K Apr 9 01:03 .bashrc
drwx------ 2 ubuntu ubuntu 4.0K Aug 14 15:41 .cache
-rw-r--r-- 1 ubuntu ubuntu 675 Apr 9 01:03 .profile
drwx------ 2 ubuntu ubuntu 4.0K Aug 14 15:33 .ssh
パーミッション
50. 基本コマンドを覚えよう
• head - output the first part of files
• head -n 15 /var/log/kern.log
• cat /var/log/kern.logをしてみると違いがわかるはず
• ちなみに/var/log/kern.logはカーネルが出力したメッセージ
51. 基本コマンドを覚えよう
• tail - output the last part of files
• tail <ファイル名>
• ファイルの末尾10行を表示
52. 基本コマンドを覚えよう
• tail - output the last part of files
• オプション
• -n <N> 最後のN行を表示
• -f ファイルを監視して,末尾に追記される度に出力
53. 基本コマンドを覚えよう
• tail - output the last part of files
• tail -f /var/log/auth.log
• SSHでもう1接続してみると更新されているのがわかるはず
137. aptを使ってみよう
• こんなエラーが出るはず
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
• 管理者権限が必要
193. HTTPについて学ぶ
• 答え
GET /#q=test HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36
Cookie: SSID=AVK9Q7TrKu7WUyGcN