Linux _ routine system configuration and maintenance

Source: Internet
Author: User
Tags dmesg
1. set the command input prompt line & amp; 26684; to & ldquo; user name: current directory $ & rdquo; 2. set the command input prompt line.

1. set the command input prompt line in the format of "user name: current directory $"


2. set the format of the command input prompt line to "current system Time-User #" (note: Shell will interpret the cited string as a command through the reverse quotation mark ).


3. Select: to modify the PATH value of the environment variable, you must append the current user's main directory PATH to the end of the variable.


4. use the at command to broadcast "hello" information to all users in the system one minute after the current time.


5. customize the following scheduled tasks: After setting the current time for two minutes, back up the file tmp (self-created) in the user's home directory to tmpbackup and check the actual effect.


6. displays the 10 most recent logins of the root user in the current system.


7. count the number of recent system restarts.


8. display the online status of the root user as of today


9. set the 5-second interval to view the basic state information of the system, indicating that the process occupies the highest CPU proportion and the process occupies the most memory.

Process Number 4698 has the highest CPU proportion, and process number 4698 and 1 occupy the most memory.


10. View and point out the processes with the lowest priority in the current system.

The priority of a process 3 is the lowest.


11. jump to the system log directory and point out the type of logs recorded in one of the log directories.

Messages: basic system running information, which is recorded by the syslog process;

Wtmp: a binary file that records user logon information.Last CommandObtain the file content;

Dmesg: You can view the device information logs in dmesg;

Secure: System Security Information record.

Cron: logs about cron of the scheduled task process

The last 10 records of system security information logs.

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.