Linux pen exam

Source: Internet
Author: User

1. Briefly describes how the Linux file system converts the logical structure and physical structure of a file through the I node.

Reference answer:

Linux converts the logical and physical structures of files through the I node table.

An I node is a 64-byte table that contains information about files, including the file size, file owner, file access permission, and file type. The most important content in the I node table is the disk address table. There are 13 block numbers in the disk address table. The files read the corresponding block numbers in the order they appear in the disk address table. The Linux file system connects the I node and the file name. When you need to read the file, the file system searches for the corresponding items of the file name in the current directory table, the corresponding I-node number of the file is obtained, and the scattered files are stored in the I-node disk address table.
The logical structure of the file.

2. Briefly describe the process initiation and termination methods and how to view the process.

Reference answer:

In Linux, there are two ways to start a process: Manual start and scheduling start:

(1) Manual start

The user issues a command at the input end to start a process directly. It can be divided:

① Foreground startup: directly enter the command in shell to start.

② Start the background: Start a non-urgent process, such as a printing process.

(2) start scheduling

The system administrator schedules the system resources and processes in advance to specify the time and occasion for running the task. Then, the system automatically completes the task.

Commonly used process scheduling Commands include at, batch, and crontab.

3. Briefly describe the DNS domain name resolution process.

Reference answer:

First, the client sends a DNS request to translate the IP address or host name. After the DNS server receives a request from the client:

(1) Check the DNS server cache. If the request address or name is found, a response message is sent to the client;

(2) If the request is not found, search in the database. If the request address or name is found, a response message is sent to the client;

(3) If no query is made, the request is sent to the root domain DNS server, and the top-level domain is queried from the root domain in sequence. The top-level lookup second-level domain and second-level domain lookup third-level domain, the DNS server sends a response to the DNS server in the network where the client is located. After receiving the response, the DNS server stores the response in the cache and sends the resolution result to the client.

(4) If no error is found, an error message is returned.

4. What are the responsibilities of the system administrator? What are managed objects?

Reference answer:

System Administrators are responsible for system resource management, device management, system performance management, security management, and system performance monitoring. Management objects are the processes of servers, users, servers, and various resources of the system.

5. Briefly describe the process of installing slackware Linux.

Reference answer:

(1) repartition the hard disk. (2) Start the Linux system (using a CD or a floppy disk ).

(3) create a Linux primary partition and a swap partition. (4) run the setup command to install the Linux system.

(5) format the Linux primary partition and swap partition (6) install the Linux software package

(7) after the installation is complete, establish the Lilo boot program for starting the Linux system from the hard disk, or create a floppy disk for starting the Linux system. Restart the Linux system.

6. What is Static Routing and its characteristics? What is dynamic routing and what are its characteristics?

Reference answer:

Static Routing is defined in the route table designed and constructed by the system administrator. Suitable for networks with a limited number of gateways and the network topology does not change frequently. The disadvantage is that the network condition cannot be dynamically applied. When the network condition changes, the network administrator must modify the route table.

Dynamic Routing is dynamically built based on the routing selection protocol. The routing protocols update the content of the route table in real time by exchanging their own routing information. Dynamic Routing automatically learns the topology of the network and updates the route table. The disadvantage is that the route broadcast update information occupies a large amount of network bandwidth.

7. What commands are used for viewing and scheduling processes?

Reference answer:

The command for viewing processes is PS and top.

Process Scheduling Commands include at, crontab, batch, and kill.

8. When the file system is damaged, how do I check and repair the system?

Reference answer:

To successfully repair a file system, you must have more than two primary file systems and ensure that the file system to be repaired is uninstalled before the restoration.

Use the command fsck to repair the damaged file system. Fsck checks the file system in five steps. Each step checks the connection characteristics of different parts of the system and verifies and modifies the previous step. When executing the fsck command, check that the disk block, path name, directory connectivity, number of links, idle block linked list, And I-node are allocated starting from the super block.

9. Explain the role of node I in the file system.

Reference answer:

In a Linux File System, information is stored in blocks. in order to locate the location where a file is stored in a bucket, I nodes are used to index a file. The I node contains all the information required to describe a file. Therefore, the I node is a data structure managed by the file system.

10. What is symbolic link and hard link? What is the difference between a symbolic link and a hard link?

Reference answer:

Links are divided into hard links and symbolic links.

Symbolic Links can be used to establish links to files and directories. Symbolic Links can be used across file systems, that is, cross-disk partitions. The file type bit of the symbolic link is l, and the linked file has a new I node.

Hard links cannot be used across file systems. It can only establish links to files. The type bits of hard links are-, and the I nodes of hard links are the same as those of the connected files.

11. When formatting Linux system partitions, You need to select the size of the disk cluster (or I node density). Please describe the selection principles.

Reference answer:

The disk cluster (or I node density) is the basic unit of the file system scheduling file. The size of the disk cluster directly affects the System Scheduling disk space efficiency. When the disk partition is large, the disk cluster should be larger. When the partition is small, the disk cluster should be smaller. Experience is usually used.

12. Briefly describe Network File System NFS and describe its function.

Reference answer:

Network File System is an application service at the application layer. It is mainly used for file or directory sharing between Linux and Linux systems, Linux and UNIX systems. Users can easily access the remote file system through NFS, making it part of the local file system. After NFS is used, the logon process is saved, which facilitates user access to system resources.

13. A line in A/etc/fstab file is as follows:

/Dev/had5/mnt/dosdata msdos ults, usrquota 1 2

Please explain its meaning.

Reference answer:

(1) first column: name of the file system to be loaded; (2) second column: Installation Point of the file system;

(3) Column 3: file system type; (4) Column 4: set parameters;

(5) Column 5: used by the backup program to determine the number of days from the last backup to the present;

(6) Column 6: Check the file system sequence during system boot.

14. The configuration file httpd. conf of the Apache server contains a lot of content. Please explain the following configuration items:

(1) maxkeepaliverequests 200 (2) userdir public_html

(3) defaulttype text/plain (4) addlanguare en. En

(5) DocumentRoot "/usr/local/httpd/htdocs"

Addtype application/x-httpd-php.php.php.php4

Reference answer:

(1) the maximum number of requests allowed for each connection; (2) set the directory where the user places the webpage;

(3) set the server's default format for unknown file types;

(4) configure a file for the language that can be transferred to the browser; (5) the directory is where Apache places the web page;

(6) Select PhP4 for the server.

15. The/etc/rc. d/rc. inet1 file of a Linux host contains the following statement. correct the error and explain the error.

/Etc/rc. d/rc. inet1:

......

Route add-net default GW 192.168.0.101 netmask 255.255.0.0 metric 1

Route add-net 192.168.1.0 GW 192.168.0.250 netmask 255.255.0.0 metric 1

Reference answer:

Corrected error:

(1) Replace route with lower case: route; (2) Replace netmask route 255.0.0 with netmask 255.255.255.0;

(3) change the subnet mask of the default route to netmask 0.0.0.0;

(4) The default route must be set at the end; otherwise, the subsequent route will be invalid.

Explanation:

(1) Route: Command for creating a static route table; (2) Add: Add a new route table;

(3)-net 192.168.1.0: The network address of the target network;

(4) Default: Create a default route; (5) GW 192.168.0.101: gateway address;

(6) metric 1: Number of routers (hops) that reach the target network ).

16.Explain the following configurations of the Apache server:

(1) port 1080 (2) userdir userdoc

(3) DocumentRoot "/home/htdocs"

(4) <directory/home/htdocs/inside>;

Options indexes followsymlinks

AllowOverride none

Order deny, allow

Deny from all

Allow from 192.168.1.5

</Directory>;

(5) server type standlone

Reference answer:

The configuration line of the Apache server is as follows:

(1) set the port number of the Apache server to 1080;

(2) set the user's webpage directory to userdoc;

(3) set the root directory of the Apache server webpage:/home/htdocs;

(4) set a directory/home/htdocs/inside on the Apache server, and this directory can only be accessed by hosts with IP address 192.168.1.5;

(5) define that the Apache server runs as an independent process.

17. What are the two logon methods for file transfer using FTP? What are their differences? What are common FTP File Transfer commands?

Reference answer:

(1) FTP has two logon modes: Anonymous logon and authorized logon. For anonymous logon, the username is anonymous and the password is any valid email address. For authorized logon, the username is the user account in the remote system, the password is the user password in the remote system.

Difference: Anonymous logon can only access resources under the FTP directory. By default, the configuration can only be downloaded. The authorized logon permission is greater than anonymous logon, and can be uploaded or downloaded.

(2) There are two FTP file transmission modes: ASCII mode and binary mode. ASCII mode is used to transmit text files, while other files are transmitted in binary mode.

(3) commonly used FTP file transmission commands: Bin, ASC, put, get, mput, mget, prompt, bye

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.