Interview Questions that often appear in Linux

Source: Internet
Author: User

1. Briefly describe the Common Open Source Software?

Operating System: linux and CentOS

Web servers: Apache (http)

Dynamic web page (jsp): Tomcat

2. How does one express the Linux kernel version?

Example: 2.6.18-348. el53 version

2: indicates the major version number.

6: indicates the minor version number. If the minor version number is an even number, it indicates the stable version. If the minor version number is a technology number, it indicates the development version;

18: indicates the version number.

348. el53 indicates that Redhat has revised this version 348 times

3. What is the difference between RHEL and CentOS?

1. Centos is a clone version of RedHat. It is the release version released after compiling the source code of redhat. However, the basic commands and usage are the same.

2. centos is a free version and does not provide any services to users. You are not responsible for any problems arising from your use of the project. While redhat charges some services and causes problems in the services provided. Redhat is responsible for solving the problem.

3. The yum command exclusive to CentOS supports online upgrades and immediate updates to the system. Unlike RedHat, you don't have to pay for the support service! In other words, the redhat service is charged, while Centos is completely free.

4. CentOS fixed many RedHat AS bugs.

4. How does one express hard disk partitions in Linux?

Example:/dev/sda1

/Dev: indicates that the device files in Linux are generally stored in this directory.

Sd: Non-IDE devices are called sd

Sh: indicates the IDE device.

A: indicates the first disk (hard disk). B: indicates the second disk... and so on.

1: indicates the first partition of the first disk. 2 indicates the second... 3 indicates the third... 4 indicates the fourth partition.

Note: a maximum of four primary partitions can be created for a disk. 5. It indicates the logical partition in the extended partition.

Push.

5. What are common directories in Linux? What are their respective functions?

/Boot: This directory is used to store files related to system startup.

/Root: root user's home directory

/Bin: stores most of the binary executable files, that is, most of the linux commands.

/Tmp: This file directory is generally public. That is to say, anyone who logs on to this file directory can operate on it (Add a new directory. new file. modify the file. delete files ). It is a file directory that temporarily stores data. Therefore, you can grant T permissions to it when necessary to increase the security of the file directory.

/Etc: it is used to store the system configuration file directory.

/Media: This is the default mount point for some device files.

/Dev: it is the directory that stores device files.

/Lib: it is a database file of the system.

/Sbin: stores some binary files (commands) executed by the system administrator ).

/Bin: some binary files (commands) that the user executes ).

........

6. What are common Linux systems? For example?

1. redhat

2. Ubuntu

3. Centos

4. openSUSE

5. Red Flag: developed by China and well supported Chinese

..........................

7. What is the role of SWAP partitioning?

Swap: it is a common name for swap partitions. It is used to place programs that are not frequently executed by the system in the swap partition, freeing up some space for the memory to execute those programs to be executed by the system.

 

8. Common Linux directory structure?

/Boot: stores the files necessary for starting the system, including kernel files and boot menu configuration files. For the sake of system security, the "/boot" directory is usually divided into independent partitions, called "/boot" partitions.
/Bin: stores the most basic user commands in the system. Common users have the execution permission.
/Dev: stores various device files in the system, such as hard drive, keyboard, mouse, and optical drive.
/Etc: stores the configuration files of the system and various programs. Programs with many configuration files will create independent subdirectories under the "etc" directory to store their respective configuration files.
/Home: stores the default working directory (also known as the home Directory) of all common user system users. For example, the host directory corresponding to the user account "zhangsan" is located in "/home/zhangsan ". If the server needs to be provided to a large number of common users, it is recommended that the/home directory be divided into independent partitions to facilitate user data backup.
/Root: the root directory of the Linux Super User root. By default, only the root directory is under the root directory, rather than under the/home directory.
/Sbin: stores the most basic management commands. Generally, the Administrator has the execution permission.
/Usr: stores other user applications, which are usually divided into many sub-directories for applications of different types.
/Var: stores the files that often need to be changed in the system, such as system logs and user email directories.
/Tmp: stores some temporary files used during system operation.

 

8. There is now a Linux server. The Common commands above prompt No such file or directory during use. Why? How can this problem be solved?

1. No such file or directory: No file or directory

2. When executing a command, the system does not have the file or directory you want to use.

Solution: Run ls to check whether the directory or file you want to use is in the corresponding directory. If the file is not re-created, run the following command.

3. Another possible cause is the syntax format error: Check whether the syntax format is incorrectly written.

2. find Command Format and common syntax?

Find file path type

9. wildcard *? [N-m] {n, m} respectively mean what?

*: Matches all files, directories, or contents.

[N-m]: represents n to m consecutive numbers or letters, etc.

{N, m}: indicates only n and m

10. What is a link? How to do it?

Connection: in fact, it is equivalent to a shortcut in Windows, just a ing. the function of the connection is to save disk space. If two files of the same size appear in different places on the disk multiple times, it is a waste of disk space, the connection is to solve this problem that files of the same size and content occupy disk space.

Hard connection: the files or directories connected to the ln file or directory. The hard connection is equivalent to copying and deleting the original file. The connection is not affected and available.

Soft connection: the file or directory connected to by ln-s depends on the source file. If the source file is deleted, the connection file is unavailable.

 

11. What commands are available to view the file content? What are their respective features?

More: You can only view the last part of the file. It is inconvenient to flip the page.

Less: it is easy to flip pages and frequently used to view large file content.

Cat: The content is relatively small. Cat-n lists the row numbers by the way.

 

12. What are the common formats of compressed packages in Linux? What are their respective features? How to compress directories?

Zip: a type of file format. The file suffix is. zip.

Zip compression format: compression of the file name to be compressed After zip Compression

Unzip

Gzip: it is a type of File compression format. The file suffix is .gz p.

Gzip Compression

Gzip-d decompress the file to be decompressed

Bzip2: it is a compressed file format. The file suffix after compression is. bzp2.

Bzip2 is more efficient than gzip.

Bzip2 compression of files to be compressed

Bzip2-d decompress the file to be decompressed

Zip files do not overwrite the original files, while gzip and bzip2 both overwrite the original files.

Directory compression: the tar command is used to package the file directory. It can also compress the file while packaging.

Recommended articles:

11 basic Linux interview questions

Basic questions about Linux interview-Part 1

Basic questions about Linux interview-Part 1

  • 1
  • 2
  • Next Page

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.