0% found this document useful (0 votes)
16 views5 pages

Linux Command and Administration Test Guide

This document is a test module consisting of various questions related to Linux commands, file management, user permissions, and system administration. It covers topics such as file manipulation, process management, user account management, and system security. The questions require knowledge of command syntax and the Linux directory structure, as well as practical applications of commands in different scenarios.

Uploaded by

suman
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views5 pages

Linux Command and Administration Test Guide

This document is a test module consisting of various questions related to Linux commands, file management, user permissions, and system administration. It covers topics such as file manipulation, process management, user account management, and system security. The questions require knowledge of command syntax and the Linux directory structure, as well as practical applications of commands in different scenarios.

Uploaded by

suman
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MODULE – I TEST

NOTE: Provide syntax where ever necessary.

1. How many arguments are in this line (not counting the command itself).

touch '/etc/cron/[Link]' 'file [Link]' "file [Link]"

2. What is the command to move a file named `data` from the `/home/user` directory to

`/home/user/Documents`?

3. What are the commands used with dircetories. List all with explanation ?

4. Name 5 distros in Linux .

5. Which command is used to view the first 5 lines of a file [Link] ? Write syntax.

6. Which command do you use in `vi` to delete the current line?

7. How do you search for a word called `error` in `vi`?

8. How do you quit `vi` without saving any changes?

9. Explain how to enter visual mode in `vi` to select text.

[Link] do you check the default file permissions for newly created files and directories?

[Link] is swap space ? What is the typical size of swap space ?

[Link] does the Linux directory structure look like? Can you name some of the folders

and their designated use?

[Link] is the significance of a dot at the start of a file name?

[Link] between hard link and Soft link.

[Link] will you create a soft link for a file ?

1
MODULE – I TEST

[Link] will you redirect stdout to a file [Link] and stderror to a file [Link] ? Give

Syntax.

[Link] is a Shell ?

[Link] do you list active processes? Can you stop one from running? give syntax

[Link] is the purpose of the 'uptime' command in Linux?

a. Display current time

b. Display system uptime

c. Display system load average

d. Display user login history

[Link] command is used to navigate to the home directory in Linux?

a. 'home'

b. 'cd home'

c. 'cd ~'

d. 'move home'

[Link] is the purpose of the grep command?

a. Count the number of words in a file

b. Find and replace text in a file

c. Search for patterns in a file

d. Display file permissions

[Link] is the purpose of the `/etc/passwd` file, and how is it structured?

2
MODULE – I TEST

[Link] command allows you to switch to another user’s account (without logging out

of your current session)?

[Link] do you list all the groups that a user called `developer` belongs to?

[Link] can you lock the account of a user named `jane` to prevent them from logging

in?

[Link] how you would add an existing user `jack` to a group called `devgroupp`.

[Link] is the location of the cat and the passwd commands ?

[Link] hostname and uname command on the same line.

[Link] sleep 200 in background

[Link] a file that contains the names of five people. Use cat and output redirection to

create the file and use a here document to end the input.

[Link] a sorted list of all bash users in [Link]. Provide syntax

32. User root has created a file "secret" with below permission which must not be

opened by anyone except root and another user "deepak", how can this be done?

# ls -l secret
-rwx------ 1 root root 0 May 31 10:59 secret

33. By default when I create a user I see that the default shell assigned is /bin/bash and
the default home directory which is assigned is under /home.
How can I make sure that next time I use "useradd", the default assigned shell is ksh
and default home directory of user is /export/home/<username>
(2 Possible ways to achieve this. specify both)
[Link] do you find the process ID (PID) of a running [Link] all Possible ways.

3
MODULE – I TEST

35. What is the difference between a process and a daemon in Linux?

36. How can you find the IP address of a Linux system?

[Link] do you set up a fixed IP address in Linux. explain with appropriate steps.

38.A user alice needs to run the yum package manager to install and remove software,

but you want to restrict them from running other administrative commands like

shutdown or reboot. How would you configure sudo to allow alice to run only yum

commands without giving full root access?

[Link] want to configure sudo so that the user anna can run the useradd command with

sudo without being prompted for a password. How would you configure this?

[Link] anna from running other user management commands. use Command Alias.

41. How to check the installed software(rpm’s) on Linux?

[Link] to list the enabled repositories ?

[Link] to know the particular files belongs to which package ?

[Link] to remove the package using yum ?

[Link] organization wants to enhance the security of remote access to servers by

disabling password-based SSH login and enforcing key-based authentication.

Expalin with syntax and steps in detail.

[Link] do you manage services on a system using systemd?

[Link] need to copy an entire directory /etc/Backup and its contents from your local

machine to a remote server. (compress the directory contents first – use tar)

4
MODULE – I TEST

[Link] will you de-compress the directory [Link] in server . you need to decompress in

/tmp folder.

[Link] are not able to transfer files using ftp from local machine to remote server. What

would be the possible causes of failure. How will you troubleshoot it. Provide syntax

[Link] you reboot your machine, You find that httpd service is not running. what will you

do to start the service immediately as well as ensure that it is running even after reboot.

[Link] is a folder /data with below permissions. I want to restrict users from deleting any

files from data directory. What should I do?

drwxrwxrwx. 3 root root 4096 Oct 17 07:07 data

[Link] you be able to cd into a directory with only read permission?

You might also like