Summary of Common Linux commands

Source: Internet
Author: User
Tags system log

1: Turn off firewall: Chkconfig IPtables off

2: View file contents: Cat/more/less/head/tail

3: Compress and Decompress files: Zip: gzip file name/Bzip2 file name

Decompression: gzip-d/gunzip bzip2-d/Bunzip

4:tar command: Compressed: GZ format, tar czf compressed file name

BZ format, tar CJF file name after compression

Unzip: (. tar.gz format) tar xzf file name-c/Directory

(. tar.bz2 format) tar xjf file name-c/Directory

5: Mount and unload the CD: Mount mount/dev/cdrom/media/

Uninstalling Umount/dev/cdrom

6: File system format: Mkfs-t EXT4/DEV/SDB1

7:LVM Volume Creation: Physical Volume Pvcreate/dev/sdb

Volume Group Vgcreate chen/dev/sdb (Chen Volume group name)

Logical Volume Lvcreate-l +30g-n benet Chen (benet Logical volume name)

8: Update File system: resize2fs/dev/volume Group name/Logical volume name

9: Kernel and public message log:/var/log/messages

Scheduled Task log:/var/log/cron

System boot log:/VAR/LOG/DMESG

Mail system log:/var/log/maillog

10: View IP information ifconfig-a View routing table route-n

11: Permanent Configuration fixed Ip:/etc/sysconfig/network-scripts/ifcfg-eth0

Effective: Service Network restart

Main program of 12:samba server: SMBD TCP protocol 139/445 port

NMBD UDP protocol 137/138 port Restart Samba Services service SMB restart


Summary of Common Linux commands

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.