fix post
This commit is contained in:
@@ -48,17 +48,19 @@ $ useradd -m -G wheel ${USER}
|
||||
$ passwd ${USER}
|
||||
```
|
||||
|
||||
```sh
|
||||
$ HOSTNAME=archlinux
|
||||
$ echo "$HOSTNAME" > /etc/hostname
|
||||
```
|
||||
|
||||
shellの変更など。
|
||||
|
||||
```sh
|
||||
$ chsh -s /bin/zsh ${USER}
|
||||
or
|
||||
$ useradd -m -G wheel -s /bin/zsh ${USER}
|
||||
```
|
||||
|
||||
```sh
|
||||
$ HOSTNAME=archlinux
|
||||
$ echo "$HOSTNAME" > /etc/hostname
|
||||
```
|
||||
|
||||
## sudoの使い方
|
||||
|
||||
1. `/etc/sudoers`は編集を間違えると起動できなくなります。安全のため`visudo`が推奨されています。
|
||||
@@ -72,10 +74,13 @@ $ vim /etc/sudoers
|
||||
|
||||
```sh:/etc/sudoers
|
||||
%wheel ALL=(ALL:ALL) ALL
|
||||
%wheel ALL=(ALL:ALL) NOPASSWD: /usr/bin/pacman -Syu --noconfirm
|
||||
```
|
||||
|
||||
よく`update`する人はpasswordなしで特定のコマンドをsudoを実行できるようにしておいたほうが良いでしょう。
|
||||
よく`update`する人は特定のコマンドをpasswordなしで実行できるようにしておいたほうが良いでしょう。
|
||||
|
||||
```sh:/etc/sudoers
|
||||
%wheel ALL=(ALL:ALL) NOPASSWD: /usr/bin/pacman -Syu --noconfirm
|
||||
```
|
||||
|
||||
```sh
|
||||
$ sudo pacman -Syu --noconfirm
|
||||
|
Reference in New Issue
Block a user