You are on page 1of 2

Install and Remove a Package

# To install the 'http' package using npm:


npm install http

# To remove the 'http' package using npm:


npm uninstall http

Create a Local Repository and Explain Why It's Used


# To create a local Git repository:
git init

A local repository is a version control system that stores code changes locally on
your computer, rather than on a remote server. This allows you to work on code and
track changes without being connected to the internet. This can be useful when
working on projects in an offline environment or when you need to work on a version
of code that is different from the version stored on the remote repository.

Upgrade Your VM to GUI


The specific steps to upgrade your VM to a GUI will depend on the operating system
you are using. Here's an example for a Ubuntu VM:
# To install the Ubuntu desktop environment:
sudo apt-get update
sudo apt-get install ubuntu-desktop

Create a User with a Password and Log In with the New User

# To create a new user:


sudo useradd newuser

# To set a password for the new user:


sudo passwd newuser

# To log in as the new user:


su - newuser

# To run a command with superuser privileges while logged in as the new user:
sudo command
sudo systemctl set-default graphical.target
sudo reboot

Create a File and Modify Its Permissions


# To create a file:
touch file.txt

# To give full permissions to the file:


chmod 777 file.txt

Download and Unzip Hadoop


# To download Hadoop using wget:
wget http://mirror.downloadvn.com/apache/hadoop/common/hadoop-3.3.0/hadoop-
3.3.0.tar.gz

# To unzip Hadoop:
tar -xzvf hadoop-3.3.0.tar.gz
Demonstrate a Scenario Using chown and chgrp
# To create a file:
touch file.txt

# To change the owner of the file to user 'newuser':


chown newuser file.txt

# To change the group owner of the file to group 'developers':


chgrp developers file.txt

You might also like