-
Create a new user named
newuser
.sudo useradd newuser
-
Create a new group named
newgroup
.sudo groupadd newgroup
-
Add
newuser
tonewgroup
.sudo usermod -aG newgroup newuser
-
Check the groups that
newuser
belongs to.groups newuser
-
Create a directory named
task_dir
in your home directorymkdir ~/task_dir
-
Change directory to
task_dir
and create a new file namedsample.txt
.cd ~/task_dir touch sample.txt
-
Change the permissions of
sample.txt
:- Owner: read and write permissions
- Group: read permissions
- Others: no permissions
chmod 640 sample.txt
OR
chmod o=rw,g=r,o= sample.txt
-
Change the ownership of
sample.txt
tonewuser
.sudo chown newuser sample.txt
-
Change the group ownership of
sample.txt
tonewgroup
.sudo chgrp newgroup sample.txt
OR
sudo chown :newgroup sample.txt
OR
sudo chown newuser:newgroup sample.txt
-
Delete the
newgroup
group.sudo groupdel newgroup
-
Delete the
newuser
account and its home directory.sudo userdel -r newuser
-
Update the package list on your system.
sudo apt update
-
Install the
lolcat
package.sudo apt install lolcat
-
Print
"I Love OSC"
by piping the output tololcat
.echo "I Love OSC" | lolcat
-
Remove the
lolcat
package.sudo apt remove lolcat