Linux common sense questions

Source: Internet
Author: User
Linux common sense-Linux general technology-Linux technology and application information. For more information, see the following section. [I = s] This post was last edited by lijiang

I. Fill in blank questions

1. links are divided into: () and ().
2. When installing Linux to partition hard disks, there must be two partition types: () and ().
3. the kernel is divided into four subsystems: Process Management System, (), I/O management system, and.
4. The vi editor has two working modes: () and ().
5. DNS is actually a database of host information distributed on the internet. Its function is to convert between () and.
6. the Sendmail system uses the following two main Protocols: () and (). The former is used to send emails and the latter is used to receive emails.
7. The mv command can be () or ().
8. shell is not only (), but also a powerful programming language. () Is the default shell of Linux.
9. The command for adding a user is: () or ().
10. When manually configuring the network, you can change the host name by modifying the () file. to configure the domain name resolution client of the computer, you need to configure the () file.
11. There are two types of backup in Linux: () and ().
12. There are two ways to run a process: () and ().
13. In the vi editing environment, use it. (If you want to store the file in the test.txt file, enter () in command mode :().
14. The pipeline uses the () of the previous command as the () of the next command ().
15. DHCP is short for the () protocol, and its function is ().
16. The rm command can delete files or directories. The main difference is whether to use recursive switches () or ().
17. When manually configuring the network, you can modify the/etc/HOSTNAME file (). to configure (), configure the/etc/resolv. conf file.
18. The ping command is used for (), and the ping command is implemented through the () protocol.
19. When installing Linux to partition hard disks, there must be two partition types: () and ().
20. In Linux, the directories used to store the required configuration files and subdirectories are () and (), which are used to store the management programs used by the system administrator.

2. Write the command to complete the following functions.
1. Delete all files and folders in non-empty folders/daisy.
2. Change the.txt file to B .txt.
3. Load the content of the USB flash drive to the/mnt/udisk folder.
4. Change the user root password. (At the # prompt ).
5. view the local website.
6. Search for files with the suffix. c In the/root folder.
7. terminate a process with process number 1001.
8. view the installed rpm software package.
9. A B .txt file is provided to file a.txt.
10. view the mkdir help document.
11. compress the/home/stud1/wangdirectory and generate the wang.tar.gz file. Then, save the file to the/home directory.
12. Check whether the installed file system/dev/had5 is normal. If the check is incorrect, it will be automatically repaired.
13. Send 10 packets to test the connectivity with the host abc.tuu.edu.cn.
14. Create a command for the parent directory if its parent directory does not exist.
15. Make the file named fido have the following permissions:-r-xr-x command.
16. Search for files with the suffix. cpp in the/root folder.
17. commands used to disable linux (do not restart)
18. Command for uninstalling the CD/dev/hdc.
19. If stud1 is known to a user, its user directory is/home/stud1. If the current directory is/home, enter the/home/stud1/test command
20. view the help documentation on music videos.

Iii. Short answer questions.
1. What are the responsibilities of the system administrator? What are managed objects?
2. What is Static Routing and its characteristics?
3. What is dynamic routing and its characteristics?
4. Briefly describe Network File System NFS and describe its function.
5. What commands are used for viewing and scheduling processes?
6. When the file system is damaged, how do I check and repair the system?
7. What are symbolic links and hard links? What is the difference between a symbolic link and a hard link?

4. analyze calculation questions.
1. Try to describe the process initiation and termination methods and how to view the process.
2. Try to describe the DNS domain name resolution process.
3. A line in A/etc/fstab file is as follows:/dev/had5/mnt/dosdata msdos defaultsusrquota 1. Please explain its meaning.
4. What should a common user do to regularly back up/user/backup to the/tmp directory at 00:00 every Sunday?
5. What are the two logon methods for file transfer using ftp? What are their differences? What are common ftp File Transfer commands?
6. Try to describe the DNS domain name resolution process.
7. Use Shell programming to determine whether a file is a character device file. If it is copied to the/dev directory.
8. A system administrator needs to do some repetitive work every day. Prepare a solution according to the following requirements:
(1) Delete All subdirectories and all files under the/abc directory;
(2) From ~ At pm, all data in the first domain of each line in the x1 file under the/xyz directory is read to the bak01.txt file under the/backupdirectory;
(3) archive and compress all directories and files under the/data directory as files at every Monday: backup.tar.gz;
(4) uninstall the CD-ROM of the IDE interface at PM (assuming the device name of the CD-ROM is hdc );
(5) Start the instance before a.m.

Reference answer
I. Fill in the blanks
1
Hard Link
Symbolic Link
2
File System Partition
Swap Partition
3
Memory Management System
File Management System
4
Command mode
Input mode
5
IP address
Host Name
6
SMTP
POP
7
Move files and directories
Rename files and directories
8
Interpreter of user commands
Bash
9
Adduser
Useradd
10
/Etc/HOSTNAME
/Etc/resolv. conf
11
System Backup
User backup
12
Run independently
Run with the parent process
13
Esc
W test.txt
14
Standard output
Standard Input
15
Dynamic Host Configuration
Is the host in the Network
Allocate
IP address
16
-R
-R
17
Host Name
Domain name resolution client of this computer
18
Test network connectivity
ICMP
19
Ext3
Swap
20
/Etc
/Sbin

II,
1. rm? R/daisy
2. mv a.txt B .txt
3. mount? T vfat? O iocharset = gb2312/dev/sda1/mnt/udisk
4. passwd root
5. ifconfig eth0
6. find/root? Name \ *. c
7. kill 1001
8. rpm-qia
9. cp a.txt B .txt
10. man mkdir
11. tar-zcvf/home/wang.tar.gz/home/stud1/wang
12. fsck? A/dev/had5
13. ping abc.tuu.edu.cn? C 10
14. mkdir? P
15. chmod 551 fido
16. find/root? Name \ *. cpp
17. halt
18. umount/dev/hdc
19. cd stud1/test
20. man mv

Iii. Short answer
1. Reference answer:
System Administrators are responsible for system resource management, device management, system performance management, security management, and system performance monitoring. Management objects are processes of servers, users, servers, and various resources of the system.
2. 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.
3. answers:
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.
4. answers:
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.
5. answers:
The command for viewing processes is ps and top.
Process Scheduling Commands include at, crontab, batch, and kill.
6. answers:
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.
7. answers:
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.

Iv. Q &
1. 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. The system will automatically complete the task at that time.
Commonly used process scheduling Commands include at, batch, and crontab.
2. 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.
3. answers:
(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.
4. answers:
(1) Method 1:
Should the user use crontab? E command to create the crontab file. The format is as follows:
0 0 ** sun cp? R/user/backup/tmp
(2) Method 2:
Create a file in your directory. The file content is as follows:
0 ** sun cp? R/user/backup/tmp, and then execute crontab file to make it take effect.
5. answers:
(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 include bin, asc, put, get, mput, mget, prompt, and bye.
6. answers:
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.
7. Reference procedure:
#! /Bin/sh
FILENAME =
Echo "Input file name :"
Read FILENAME
If [-c "$ FILENAME"]
Then
Cp $ FILENAME/dev
Fi
8. Reference answer:

(1) Use vi to create and edit a crontab file named prgx;
(2) prgx file content:
50 16 * rm-r/abc /*
0 8-18/1 *** cut-f1/xyz/x1>;/backup/bak01.txt
50 17 *** tar zcvf backup.tar.gz/data
55 17 *** umount/dev/hdc
(3) log on to the Super User and use crontab to execute the content in the prgx file:
Root @ xxx: # crontab prgx; crontab can be automatically started after it is started up before every morning.

Source: ChinaUnix

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.