For details about how to use linux to learn 8-Linux Enterprise Application-Linux server application, see below. Study with me in linux 8
Detailed introduction to linux partition and firewall configuration
1. fsck command
Fsck. ext2-y/dev/sda1 tool for checking the data integrity of the file system fsck
2. linux generally requires partitioning, partitioning, and formatting, that is, information creation, including vfat, ext2, and ext3.
First, add, modify, and delete partitions in fdisk/dev/hdx.
After adding and modifying partitions, you must restart the computer to read the partition table information.
3. The p command prints partition table information. n creates a new partition, d deletes the partition, t converts the partition id, w stores the partition table, and q does not save and exits the partition table.
4. After going in, we should first split the primary partition, first run the p command to check the partition conditions, then add n to a partition, select the primary partition, and set the historical cylinder to 1.
At last, I wrote 10 to the cylinder. To determine the partition size, we need to add 1000 MB to divide the next partition into 1000 MB, and then create an extended partition, note that only one extended partition can be used. e is used to expand the partition. All space is used here. When the cylindrical partition is created, we can only create a logical partition by l, the number of the logical zone can only start from 5. The historical cylinder is the historical cylinder that establishes the extended partition. You can press p to view the number. If you want to change the partition type, use t, enter 3, that is, the partition number you need to change. Enter l to view the partition. 82 is the virtual swap partition linuxswap. If I want windows to view the partition, I want to change the partition type. Here, input c is the partition in windowsfat format, and w is used to save the current partition.
5. Now we start to format the partition mkfs. ext3/dev/sdb1. This partition is linux, so we need to format it as a linux partition.
Mkfs. vfat/dev/hdd2 is a windows partition, so format it as vfat.
Note that the linuxswap file cannot be formatted using mkfs.
Because the swap partition only reads temporary files in the memory.
We can only use mkfswap/dev/sdb4 to initialize the partition and then initialize it to the swap partition.
6. Then mount/dev/sdb1/mnt.
Echo "hello meinv">/mnt/meinv.txt Write File Experiment
Ls-ld/mnt
If you do not need a mounted device, you 'd better detach it from umount.
7. To enable the system to recognize the hard disk partition from startup, We need to write it to/etc/fstab.
Write it into it
/Dev/hdd1/mnt/sd1 ext3 defaults 0 0
The directory to which/mnt/sdb1 is mounted when it is started
Ext3 file type
Defaults setting options
Whether to back up the partition at the first 0
The second 0 does not need to be started for self-check.
Noauto does not require automatic mounting.
8. We can use df-T to check the partition type.
9. We can mount it with a volume label.
# E2lable/dev/sdb1 meinv
# Mount LABLE = meinv/mnt/sdb1
We can write it into the volume label vi/etc/fstab
Add this line LABLE = meinv/mnt/sd1 ext3 defaults 0 0
10. Select the mount Option-t is the type-o option, ro is the read-only uid, user gid is the group umask is the permission
Mount/dev/hda2/d-t vfat-o iocharest = gb2312, ro, uid = jr, gid = jr, umask = 0077
Mount-t vfat-o utf8/dev/hda2/d
11. tune2fs-l/dev/sdb1 print the attributes of the partition.
Tune2fs-c-1/dev/sdb1-c indicates self-check.-1 indicates mounting several self-checks. The advantage of this is that no matter whether the power is down or shut down abnormally, will not self-check this hard disk partition
For detailed configuration of the firewall, I hate spam people who only read and do not reply to the firewall. If you need to, please reply and add me QQ and I will send it to you. Firewall configuration is absolutely practical. Hey, I hope you can support me.
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