Several common linux commands

Source: Internet
Author: User
I usually use several linux commands-general Linux technology-Linux technology and application information. The following is a detailed description. 1. Create a directory using mkdir

After mkdir-p PATH is added with-p, you can follow the PATH of the entire string. By default, if-p does not exist, you can only create a directory under the current directory.

2. rm-rf: delete a file or directory. Of course, "r" indicates that all files in the current directory are deleted cyclically. F indicates that you are not prompted to confirm the deletion.

3. kill-9 pid. Everyone knows this.

4. When useradd-m username is added with-m, the main directory can be automatically created under/home.

5. cd-you can switch to the previous working directory.

6. ls-al

7. cp-a filename: copy the file.-a indicates that the permission of the original file is not changed during the copy and can be used to copy the entire directory. In general, we need to use the-r option when copying a directory, but if you use the-a option, it includes the-r option function.

8. tar zxvf filename.tar.gz

Tar jxvf filename.tar.bz2

Note that different parameters correspond to different file suffixes.

9. find/-name "filename"

10. Create a soft link using ln-s file

11. ifconfig eth0 192.168.0.1 (netmask 255.255.255.0 broadcast 192.168.0.255) is optional in parentheses

12. route add (del) default gw 192.168.0.1

13. mount-t vfat/dev/hda5/windows/d mount the d disk in windows to the/windows/d directory. The format of the d disk is fat.

Mount-t ntfs-o iocharset = utf8/dev/hda5/windows/d When mounting the d disk, use the utf8 encoding format, that is, there will be no Chinese garbled characters after mounting. At this time, the D disk can only be read and cannot be written after it is mounted. To write the ntfs file format, you need to use the ntfs-3g software.

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.