Pages

Wednesday 13 December 2023

Display your own Text on ubuntu terminal

$ figlet -f slant "Big Data" -c | lolcat && figlet -f digital -c "Drive into DataScience" | lolcat 

How to display the above text on terminal:


Useful commands:

How to check the number of directories created by the user on terminal:

csedept@cse:~$ ls /home
csedept  hdoop

csedept@cse:~$ ls -l /home/hdoop/
total 16
-rw-r--r--  1 hdoop hdoop 8980 Dec 18 16:26 examples.desktop
drwxr-xr-x 14 hdoop hdoop 4096 Dec 18 16:55 hadoop

How to enter into the root terminal:
csedept@cse:~$ sudo -s
root@cse:/home/csedept# 

How to use id command on the  terminal:
csedept@cse:~$ id
uid=1000(csedept) gid=1000(csedept) groups=1000(csedept),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lpadmin),126(sambashare)
csedept@cse:~$ id -u
1000
csedept@cse:~$ id -n -u
csedept

csedept@cse:~$ sudo adduser duck
[sudo] password for csedept: 
Adding user `duck' ...
Adding new group `duck' (1001) ...
Adding new user `duck' (1001) with group `duck' ...
Creating home directory `/home/duck' ...
Copying files from `/etc/skel' ...
New password: 
Retype new password: 
passwd: password updated successfully
Changing the user information for duck
Enter the new value, or press ENTER for the default
Full Name []:duck 
Room Number []: 
Work Phone []: 
Home Phone []: 
Other []: 
Is the information correct? [Y/n] y
csedept@cse:~$ ls /home/
csedept  duck  hdoop

How to switch the user using su command:
csedept@cse:~$ su - duck
Password: 
duck@cse:~$ logout
csedept@cse:~$ 


No comments:

Post a Comment

Friends-of-friends-Map Reduce program

Program to illustrate FOF Map Reduce: import java.io.IOException; import java.util.*; import org.apache.hadoop.conf.Configuration; import or...