How to change Timezone in VirtualBox (Guest OS is Linux)

Ref: https://www.vpnttg.com/installation/virtualbox

List the Timezone
$ timedatectl list-timezones
Set the Timezone (e.g., Asia/Bangkok)
$ sudo timedatectl set-timezone Asia/Bangkok
Verify new setting by the following two commands,

  • date command: show date and current time
    $ date
  • ls -l /etc/localtime command: show Timezone info
    $ ls -l /ect/localtime

วิธีเป็น superuser in Linux

Ref –> Linux Login as Superuser (root user)

How to become superuser in Linux

Let us see some examples of the su and sudo command to become superuser in Linux.

Become a superuser in Linux using sudo command
You must be part of special secondary group on Linux:

  • sudo group on a Debian or Ubuntu Linux
  • wheel group on a CentOS/RHEL/Fedora/Oracle Linux
  •  
    You can see your secondary group membership by running either groups command or id command
    $ groups
    $ id

    Next run the following command to become a root/super user:
    $ sudo -i
    When promoted type your password to gain root shell
    and when need to logout use
    $ exit