Linux interview questions, linux interview questions

Source: Internet
Author: User

Linux interview questions, linux interview questions

------- This is the Linux interview question -----------------

Part 1: multiple choice questions (50 points for each question)

 

1. When creating Linux partitions, you must create two partitions (D ).

A. FAT/ntfs B. FAT/SWAP C. NTFS/SWAP D. SWAP/root Partition

2. When you log on to Linux, a shell with a unique process ID will be called. What is this ID (C)

A. nid B. PID C. UID D. CID

3. Which directory stores user password information (B)

A./boot B./etc C./var D./dev

4. By default, the Administrator creates a user and creates a main directory under the (B) directory.

A./usr B./home C./root D./etc

5. When mounting a device or file system using mount, the name of the device to be used is located in the (D) directory.

A./home B./bin C./etc D./dev

6. to list all files in A directory, use the command line ().

A. ls-l B. ls C. ls-a (all) D. ls-d

7. In the vi Editor, run the "dd" command to delete the current ()

A. Row B. Variable C. Word D. Character

8. In Red Hat and centos, run the (D) command to view the status of network interfaces.

A. ping B. ipconfig C. winipcfg D ifconfig

9. Press the (A) Key to terminate the currently running command.

A. Ctrl-c B. Ctrl-f c. Ctrl-B D. Ctrl-D

10. you can run the "vi/etc/inittab" command to view the content of the file. You accidentally modified some content. To prevent system problems, you do not want to save the modified content, how do you operate (B)
A. in last row mode, type: wq B. In last row mode, type: q!
C. In the last line mode, type: x! D. In editing mode, type the "ESC" key to exit vi.

11. In the following partitions, the default partition for centos6.5 is (D)

A. nfs B. EXT4 C. EXT3 D. NTFS

12. To release the mouse from the VM, press ().

A. Ctrl + Alt B. Ctrl + Alt + Del C. Ctrl + Alt + Enter D Ctrl + Enter

13. If you want to learn more about a command, use (B)

A. ls B. help C. man D dir

14. The configuration file of the Samba server is (D ).
A httpd. conf B inetd. conf C rc. samba D smb. conf

15. Linux File permissions have a total of 10 characters in length and are divided into four sections. The third section indicates (C ).

A. File Type B. permission of the file owner

C. permissions of the group where the file owner is located D. permissions of other users

16. When you use the mkdir command to create a new directory, the option to create a parent directory before its parent directory does not exist is (D ).

A.-m B.-d C.-f D.-p

17. Which of the following statements about the/etc/fstab file is true? (D ).

A. the fstab file can only describe the file system of linux.

B. The CD_ROM and floppy disk must be automatically loaded.

C. The file system described in the fstab file cannot be uninstalled.

D. Load the file system according to the fstab file description at startup

18./etc/shadow file ().

A. Basic User Account Information B. encryption of user passwords

C. User Group information D. File System Information

19. To uninstall a software package, use _ B ___.

A. rpm-I B. rpm-e C. rpm-q D. rpm-V

20. Which of the following statements about the file "/etc/sysconfig/network-scripts/ifcfg-eth0" is true? (D ).

A. It is A system script file B. It is an executable file

C. It stores the local name D. It specifies the eth0 IP address of the Local Machine

21. In LINUX, run the (A) command to view the file content.

A. more B. cd C. login D. logout

22. The default package format of the installation package provided by red hat linux is ().

A..tar B ..tar.gz C .. rpm D..zip

23.if you want to compress the myfile.txt file in the current directory into myfile.txt.tar.gz, the implemented command is (C ).

A.tar-cvf myfile.txt myfile.txt.tar.gz

B .tar-zcvf myfile.txt myfile.txt.tar.gz

C.tar-zcvf myfile.txt.tar.gz myfile.txt

D.tar-cvf myfile.txt.tar.gz myfile.txt

24. Which of the following operations cannot be performed by the usermod command? (B)

A. Rename the Account B. Delete the specified account and the corresponding home directory

C. Locking and unlocking user accounts D. Locking or unlocking user passwords

25. The network administrator can perform access control, access control, and operation control on the www server, which can be reflected in (A) files.

A. httpd. conf B. lilo. conf C. inetd. conf D. resolv. conf

 

Part 2: Fill in blank questions (1 point for each blank total 15 points)


1. During Linux kernel boot/Etc/fstab.

2. The permission for a file is drw-r --, which is expressed in numerical form.644The file property isRead/write.

3. links are divided into soft links and hard links.

4. Specify the command and parameter of the execution right for the script file as chmod 111 shell.

5. In the/root folder, run the find/root-name "*. cpp" command to find the file with the suffix. cpp.

6. Run the command rpm-e/dev/hdc to unmount the CD/dev/hdc.

7. The command to immediately end the background process with PID 19222 is.

8. Use the yum install-y wu-ftpd-2.6.2-8.i386.rpm command to upgrade to install the wu-ftpd-2.6.2-8.i386.rpm package

9. create a user named user02. The private group and standard group are stuff, the user's home directory is/home/user2, and the user's login shell is/bin/bash, command: useradd-d/home/user2-s/bin/bash-g stuff-G stuff user02.

10. When the command ls-l is executed, a line is shown as follows:

-Rwxrw-r -- 1 chris group1 207 jul 20 mydata

(1) Does user chris have read and write permissions on the file?

(2) After the command useradd-G group1 Tom is executed, does the user Tom have the read and write permissions on the file?

(3) Can the chmod 777 mydata command enable anyone to read and write and execute this file?

 

Part 3: Short answer questions (35 points in total)

1. Briefly describe several running levels of linux and their meanings. (7 points)

 

0-stop (do not set initdefault to 0) 0 indicates stop, and the machine is disabled.
1-Single User Mode 1 is single user mode, just like the security mode in Win9x.
2-multi-user, but not NFS 2 is in multi-user mode, but NFS is not supported.
3-full multi-user mode 3: full multi-user mode, which is a standard running level.
4-4 is not used. In some special cases, you can use it to do something. For example, you can switch to this mode to make some settings when the battery of your laptop is exhausted.
5-X11 5 is X11, And it enters the X Window System.

6-Restart (do not set initdefault to 6) 6. Restart after running init 6.

 

 
 
 
 
 
 

 

 

 

 

 

 

 

 

 

2. What kinds of working modes does the vi editor have? How can we switch between these working modes? (6 points)

 

Normal Mode, insert mode, command mode

The default mode is normal. In normal mode, enter ":" to enter the command mode,

Press Esc to return to normal mode.

In normal mode, you can press "a A I I o O o" to enter the insert mode.

 

 

 

 

 

 

 

3. Briefly describe how to forget the root password. (10 points)

 

 

After the computer is started, GRUB appears. Press e, locate linuxl6, add rd. break console = tty0 to the end, and press ctrl + x to enter the rescue mode.

You can change the root password.

Then restart the computer.

 

 

 

 

 

 

 

 

 

 

 

4. Use vsftp to configure the FTP server and write out the detailed configuration process and configuration options. (12 points)

Requirements:

1) local users are not allowed to log on;

2) Specify the logon directory of anonymous users as/soft (Prompt: Add anon_root = ****);

3) anonymous users in the/soft directory can download files but cannot upload them;

4)/soft/linux/Directory Anonymous Users can upload files but cannot download or change them (Tip: Change umask value );

5) automatically change the File Uploaded by anonymous users to owner Wei user2.

1. install yum install-y vsftpd

2. Configure vsftpd. conf in/etc/vsftpd

3. Anonymous_enable = NO

4. Local_enable = NO

5. Local_root =/soft

Related Article

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.