Here is the complete list of commands for creating a ne
1. Create a Separate User in Ubuntu with a Home Directory
-
Open Terminal:
- Press
Ctrl + Alt + T
to open the terminal.
- Press
-
Create the New User:
- Replace
newusername
with your desired username.
sudo adduser newusername
- Replace
-
Add User to the
sudo
Group (Optional):- If you want the new user to have administrative privileges, add them to the
sudo
group:
sudo usermod -aG sudo newusername
- If you want the new user to have administrative privileges, add them to the
-
Verify the New User:
- To check if the user is created and see the home directory:
ls /home
2. Install Ubuntu Desktop Environment
You can install the default GNOME desktop or other environments. Below are commands for both options.
Install Ubuntu Desktop (GNOME)
-
Update Package List:
sudo apt update sudo apt upgrade
-
Install GNOME Desktop Environment:
sudo apt install ubuntu-desktop
3. Install and Configure lightdm
(If Preferred)
If you want to use lightdm
as your display manager, follow these steps.
-
Install
lightdm
:sudo apt install lightdm
-
Choose
lightdm
as the Default Display Manager:- During installation, you might be prompted to choose a display manager. If not, run:
sudo dpkg-reconfigure lightdm
- Select
lightdm
(or another preferred option) when prompted.
-
Restart the System:
sudo reboot
4. Reboot the System
After installing the desktop environment and configuring the display manager, reboot the system:
sudo reboot
Install Chrome Remote Desktop on the VM instance
- In the SSH window for your VM instance, add the Debian Linux Chrome Remote Desktop repository to your
apt
package list, and install thechrome-remote-desktop
package.
curl https://dl.google.com/linux/linux_signing_key.pub \
| sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/chrome-remote-desktop.gpg
echo "deb [arch=amd64] https://dl.google.com/linux/chrome-remote-desktop/deb stable main" \
| sudo tee /etc/apt/sources.list.d/chrome-remote-desktop.list
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive \
apt-get install --assume-yes chrome-remote-desktop
The DEBIAN_FRONTEND=noninteractive
parameter suppresses a prompt to configure a layout for a keyboard that would be directly connected to the VM instance.