Some tips for Linux system maintenance, including how to attach a new disk to your system! Can be collected!

Source: Internet
Author: User

Here are some of the tips used in peacetime, not many, but will continue to update ....

1. Need to create a hard link ln


Full backup hard link required
Ln/etc/xxx/home/xxx


2.root users can not remotely


    /etc/ssh/sshd_config
Permitrootlogin No
Allowusers XXX


3. Synchronizing the Software clock


    Date MMDDHHMMCCYY.SS
Hwclock--set--date= "2011-08-14 16:45:05"

4.SSH Service Restart and switch


    Ubuntu 14.04:/etc/init.d/ssh Stop/start/restart
Centos7:service sshd Restart
5.centos7.0 the command to view the IP address later becomes

    IP addr iplink ip-s link

View network status using Ifconfig after you install Net-tools

* 6.linux you need to create a partition and set Mount
1. Create a partition
First use fdisk-l to view all hard drives and partitions
DISK/DEV/XVDB:100.0GB, 10022154265402bytes is your unpartitioned hard disk
Span style= "font-family: Arial" > using FDISK/DEV/XVDB for partitioning operations Command order n, p, 1, two times return, Wq
next use MKFS.EXT4/DEV/XVDB1 to format the partition with Ext4 file system
2. The following will mount the drive letter

is now temporarily mounted, and if the hard disk configuration disappears after the computer loses power or restarts, you also need to edit the partition file/etc/fstab. Writes the hard disk information to the system auto-mount

/ETC/ABC (Mount Path) ext4 (file system format) defaults (parameters that can be used when mount) 0 (the flag bits that the system needs to back up at dump, 0 does not need backup 1 need to be backed up) 1 (filesystem whether to post, 0 not self-test, 1 and 2 are self-checking, note that the root partition must be set to 1, and the other partitions are set to 2.)

Some tips for Linux system maintenance, including how to attach a new disk to your system! Can be collected!

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.