Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the Linux interview order questions?

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Most people do not understand the knowledge points of this article "what are the Linux interview order Q & A questions?", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can gain something after reading this article. Let's take a look at this "Linux interview order question and answer questions" article.

Q: 1 how do I view the runlevel of the current Linux server?

Answer: the 'who-r' and 'runlevel' commands can be used to view the runlevel of the current Linux server.

Q: 2 how do I view the default gateway for Linux?

Answer: with the "route-n" and "netstat-nr" commands, we can view the default gateway. In addition to the default gateway information, these two commands can also display the current routing table.

Q: 3 how do I rebuild the initialization memory disk image file on Linux?

A: in CentOS 5.X / RHEL 5.X, you can use the mkinitrd command to create an initialization memory disk file, as an example:

# mkinitrd-f-v / boot/initrd-$ (uname-r). Img $(uname-r)

If you want to create an initialization memory disk for a specific kernel version, replace 'uname-r' with the desired kernel name. In CentOS 6.x / RHEL 6.x, use the dracut command to create an initialization memory disk file, as an example:

# dracut-f

The above command creates an initialization memory disk for the current system version, and rebuilds the initialization memory disk file for a specific kernel version using the following command:

# dracut-f initramfs-2.x.xx-xx.el6.x86_64.img 2.x.xx-xx.el6.x86_64

Q: what is the 4 cpio command?

A: cpio means to copy in and out. Cpio can copy files, lists, and extract files from an archive file (or a single file).

Q: what is the 5 patch command? How to use it?

A: as the name implies, the patch command is used to write changes (or patches) into a text file. The patch command usually receives the output of diff and converts the old version of the file to the new version. For example, the Linux kernel source code consists of millions of lines of code files, so whenever any code contributor contributes the code, just send the changed part instead of the entire source code, and the receiver uses the patch command to write the changes into the original source code. Create a diff file for patch to use

# diff-Naur old_file new_file > diff_file

The old and new files are either individual files or directories that contain files, and the-r parameter supports directory tree recursion. Once the diff file is created, we can patch the old file and turn it into a new one:

# patch

Q: what is the use of 6 aspell?

A: as the name implies, aspell is an interactive spell checker on the Linux operating system. The aspell command succeeds an earlier program called ispell, and as a free alternative, most importantly, it works very well. When the aspell program is mainly used by other programs that require spell checking, it can be very effective as a stand-alone tool on the command line.

Q: 7 how do I view domain SPF records from the command line?

Answer: we can use the dig command to look at the domain SPF record. Examples are as follows:

Linuxtechi@localhost:~$ dig-t TXT google.com

Q: 8 how do I identify the associated package of the specified file (/ etc/fstab) in the Linux system?

A:

# rpm-qf / etc/fstab

The above command lists the packages that provide the file "/ etc/fstab".

Q: 9 which command is used to view the status of bond0?

A:

Cat / proc/net/bonding/bond0

Q: what is the use of the / proc file system in a 10 Linux system?

A: the / proc filesystem is a memory-based filesystem that maintains information about the current running kernel state, including CPU, memory, partition, Igamo address, direct memory access channel, and running processes. This file system does not represent a variety of files that actually store information, they point to information in memory. The / proc file system is automatically maintained by the system.

Q: 11 how do I find files larger than 10MB in the / usr directory?

A:

# find / usr-size + 10m

Q: 12 how do I find files that were modified 120 days ago in the / home directory?

A:

# find / home-mtime + 120

Q: 13 how do I find files that have not been accessed within 90 days in the / var directory?

A:

# find / var /!-atime-90

Q: 14 look for the file "core" under the entire directory tree and delete them without prompting if found.

A:

# find /-name core-exec rm {} /

Q: what is the purpose of the 15 strings command?

Answer: the strings command is used to extract and display text strings in non-text files. (LCTT translation note: when used to analyze inexplicable binaries on your system, you can find suspicious file access, which is useful for tracking intrusions.)

Q: what is the purpose of the 16 tee filter?

A: the tee filter is used to send output to multiple destinations. If used in a pipe, it can copy one copy of the output to a file and another copy to the screen (or some other program).

Linuxtechi@localhost:~$ ll / etc | nl | tee / tmp/ll.out

In the above example, the output from ll can be captured into the / tmp/ll.out file and also displayed on the screen.

Q: 17 export PS1 = "PWD:" what is this command doing?

A: this export command changes the login prompt to display the user name, local name, and current working directory.

Q: 18 ll | what is the command awk'{print 9} 'doing?

A: this ll command displays the file names of these files and their owners.

Q: 19: what is the use of the at command in Linux?

A: the at command is used to schedule a program for one-time execution in the future. All submitted tasks are placed in the / var/spool/at directory and executed by the atd daemon when it is time to execute.

Q: what is the purpose of the lspci command in 20 linux?

Answer: the lspci command is used to display information about the PCI bus and additional devices on your system. Specify-vJM VV or-vvv to get more and more detailed output, and the output of the command will be more readable if you add the-r parameter.

The above is about the content of this article "what are the Linux interview order questions?" I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report