You are on page 1of 2

LINUX LAB PROGRAMS

1. Write the commands to do the following:


a. create the users name the users - john, peter, jacob
b. set the password 12345
c. create a group called REDHAT
d. Add the users to the group REDHAT
e. create a file in /var directory named official.txt
f. change the group ownership of the file to REDHAT
g. Assign permission for the group as read write only

2. Write a shell script to accept to accept two arguments and display the following output
a. Total number of command line argument
b. script name
c. first argument
d. second argument
e. All of them

3. Write a shell script to accept a filename and delete the file.

4. Write a shell script to accept a filename as argument and display the file.

5. Write a Shell script to display the multiplication table of a given number.

6. Write a shell script that takes a uid as an argument and prints out that person's name,
home directory, shell and group number.

7. Write a shell script that asks the user to type a word in, then tells the user how long that
word is. (read, wc)

8. Write a Shell Script to Get the Current Date, Time, Username and Current Working
Directory and write to a file.

You might also like