When you start EC2, the settings you want to do first
--Default is UTC --Change the timezone to Asia / Tokyo and set it to JST --Restart crond after changing the timezone
$ timedatectl status
Local time: Fri 2020-06-26 06:10:18 UTC
Universal time: Fri 2020-06-26 06:10:18 UTC
RTC time: Fri 2020-06-26 06:10:18
Time zone: n/a (UTC, +0000)
NTP enabled: yes
NTP synchronized: no
RTC in local TZ: no
DST active: n/a
$ sudo timedatectl set-timezone Asia/Tokyo
$ timedatectl status
Local time: Fri 2020-06-26 15:50:10 JST
Universal time: Fri 2020-06-26 06:50:10 UTC
RTC time: Fri 2020-06-26 06:50:09
Time zone: Asia/Tokyo (JST, +0900)
NTP enabled: yes
NTP synchronized: no
RTC in local TZ: no
DST active: n/a
$ sudo systemctl restart crond
$ date
Fri Jun 26 16:03:47 JST 2020
--The default is less information, so change it
--Before change: [ec2-user @ ip-XX-XX-XX-XX ~] $
--After change: [16:17:47 ec2-user @ ip-XX-XX-XX-XX ~] $
--Add ʻexport PS1 to
.bashrc --Edit
$ PS1 in
/ etc / bashrc` if you want to reflect it in the whole
--Don't forget to reflect with the source command
$ vi .bashrc
# User specific aliases and functions
export PS1='\[\033[37m\][\t \[\033[36m\]\u\[\033[37m\]@\h \[\033[32m\]\W\[\033[37m\]]$ '
$ source .bashrc
――You don't have to do it, but if you want to have a Japanese environment, do it.
$ localectl status
System Locale: LANG=en_US.UTF-8
VC Keymap: n/a
X11 Layout: n/a
$ sudo localectl set-locale LANG=ja_JP.UTF-8
$ sudo localectl set-keymap jp106
$ localectl status
System Locale: LANG=ja_JP.UTF-8
VC Keymap: jp106
X11 Layout: jp
X11 Model: jp106
X11 Options: terminate:ctrl_alt_bksp
There is nothing else in it, so install the one you want to use. git
$ sudo yum install -y git
$ git -version
git version 2.23.3
-Change the host name of the Amazon Linux instance
Recommended Posts