Linux Operations Common basic interview exercises (4)-Promotion

Source: Internet
Author: User

Linux Operations Common basic interview exercises (4)-Promotion

1 ( ZZ ) command is executed in the VI Editor to exit the disk

A:q B ZZ c:q! D:wq

2 with a virtual machine installed a Linux system, suddenly want to clone a server, after cloning found unable to surf the internet, how to solve?

1 Remove the UUID MAC address of the Linux NIC Eth0

2 emptying the/etc/udev/rules.d/70-persistent-net.rules

3 reboot

3 Common Network Detection command and Parameter enumeration description

1 Ping

2 Telnet

3 Netstat-lntup

4 traceroute

4 Script implementations: find files larger than 1M under directory/var/log/move to/tmp/log

Find/var/log-type f-size +1m |xargs-i mv {}/tmp/log

Find/var/log-type f-size +1M-EXEC-MV {}/tmp/log

5 What are you going to do if you want to package all the files in the/home/zheng directory into/tmp/zheng.tar.gz? What should I do when I need to recover from a compressed package?

Tar-zcf/tmp/zheng.tar.gz/home/zheng

Tar-xf/tmp/zheng.tar.gz-c/home/zheng

6 A brief description of how to resolve the forgotten root password

1 Enter single user mode, change password

2 Go in rescue mode change password

Modify passwd configuration file directly passwd Modify

7 The command to detect the route that the host has been routed to the destination host under Linux is ( traceroute ).

A Ping B Route C traceroute D ifconfig

8 How to view the top 5 processes that consume the most memory resources, write out the commands

Top

Free-m

9 How to see how much memory a process consumes

[[Email protected] ~]# PS aux | grep ssh

Root 1477 0.0 0.2 66260 1076? Ss Apr08 0:00/usr/sbin/sshd

Root 72692 0.1 0.8 102104 4152? Ss 02:56 0:00 sshd: [Email protected]/0

Root 72741 0.0 0.1 103332 840 pts/0 s+ 03:01 0:00 grep--color=auto ssh

[Email protected] ~]#

10 How do I see the process that occupies port 8080?

[Email protected] ~]# ps-ef |grep 8080

Root 4056 4039 0 18:42 pts/2 00:00:00 grep 8080

[Email protected] ~]#

How to view the TCP port that is being monitored by a PID 100 process

[[email protected] ~]# ps-ef |awk ' {print $} ' |grep 100

11 See which process a port belongs to the command

Ps-ef


Linux Operations Common basic interview exercises (4)-Promotion

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.