OS簇息
誊肌
车妥 †
Ubuntu / Ubuntu server 22の介袋肋年
ユ〖ザ雌浑 †
ユ〖ザ判峡 †
办忍弄なuseraddではなく、adduserコマンドを蝗脱する。
- 今及
# adduser [USERNAME]
- 毋
# adduser osm Adding user `osm' ... Adding new group `osm' (1001) ... Adding new user `osm' (1001) with group `osm' ... Creating home directory `/home/osm' ... Copying files from `/etc/skel' ... New password: Retype new password: passwd: password updated successfully Changing the user information for osm Enter the new value, or press ENTER for the default Full Name []: osm Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y
sudo涪嘎烧涂 †
visudoを脱いて涪嘎の烧涂を乖う。
デフォルトのエディタはviではないため、瘦赂や姜位は[Ctrl]+[キ〖]にて扩告する。
- 今及
# visudo /etc/sudoersが漓脱のモ〖ドで弹瓢する
- 纳淡柒推∈链涪嘎を烧涂する毋∷
[USERNAME] ALL=(ALL:ALL) ALL
茨董肋年 †
タイムゾ〖ン肋年 †
- JSTに肋年
$ sudo timedatectl set-timezone Asia/Tokyo
- タイムゾ〖ンの山绩
$ sudo timedatectl Local time: Sun 2024-04-14 20:18:15 JST Universal time: Sun 2024-04-14 11:18:15 UTC RTC time: Sun 2024-04-14 11:18:15 Time zone: Asia/Tokyo (JST, +0900) System clock synchronized: no NTP service: active RTC in local TZ: no
- タイムゾ〖ンの办枉
$ sudo timedatectl list-timezones
瓢侯肋年 †
ネットワ〖ク肋年 †
Ubuntu 22のネットワ〖ク肋年はnetplanを脱いて乖う。
肋年ファイルは/etc/netplanに呈羌されている。
インスト〖ル木稿には
夸京される缄界としては、00-installer-config.yamlが栏喇されているが、これを傅に盖铜肋年を侯ることが夸京されている。
- 肋年ファイルの侯喇
cd /etc/netplan cp 00-installer-config.yaml 99_config.yaml mv 00-installer-config.yaml 00-installer-config.bak
- 肋年の瓤鼻
netplan apply
- エラ〖滦炳
- Error in network definition: expected mapping (check indentation)
惧淡のエラ〖は肋年ファイルのインデントが疙っている眷圭に券栏するため、肋年ファイルを斧木す。
- Error in network definition: expected mapping (check indentation)
IPアドレスの恃构 †
/etc/netplanにある肋年ファイルを饯赖する。
- /etc/netplan/99_config.yaml
network: ethernets: ens160: addresses: - 192.168.103.131/16 routes: - to: default via: 10.10.0.1 nameservers: addresses: - 192.168.0.139 search: [] ens192: addresses: - 192.168.131.202/24 nameservers: addresses: [] search: [] version: 2
笆布のコマンドで恃构を瓤鼻する。
netplan apply
箕癸肋年 †
- 附哼の箕癸
# date Sat Feb 4 07:48:37 AM UTC 2023
- タイムゾ〖ンの肋年澄千
# timedatectl Local time: Sat 2023-02-04 07:49:02 UTC Universal time: Sat 2023-02-04 07:49:02 UTC RTC time: Sat 2023-02-04 07:49:02 Time zone: Etc/UTC (UTC, +0000) System clock synchronized: no NTP service: active RTC in local TZ: no
- タイムゾ〖ンの恃构
# timedatectl set-timezone Asia/Tokyo
- 恃构冯蔡の澄千
# timedatectl Local time: Sat 2023-02-04 16:49:18 JST Universal time: Sat 2023-02-04 07:49:18 UTC RTC time: Sat 2023-02-04 07:49:18 Time zone: Asia/Tokyo (JST, +0900) System clock synchronized: no NTP service: active RTC in local TZ: no
# date Sat Feb 4 04:49:21 PM JST 2023
Last-modified: 2024-04-14 (泣) 20:18:56 (11d)