Basic Linux System tutorials and operational learning records

Source: Internet
Author: User

The Linux system directory structure uses a tree-like directory structure:

Config file in/etc system

/bin,/sbin,/usr/bin,/usr/sbin This is the placement directory of the system preset execution file

/var program generates the corresponding log

The topmost layer of the filesystem begins with the root directory, and the system uses / to represent the root directory. Under the root directory, you can either be a directory or a file, and each directory can contain subdirectory files. This can be a huge file system over and over again.

In the Linux file system there are two special directories, a user's working directory, also known as the current directory, you can use a point . the other is the top-level directory of the current directory, also known as the parent directory, you can use two points: to represent.

    • . : Represents the current directory, or it can be used.
    • .. : Represents the previous level of the directory, or you can ... /to represent.

If a directory or file name is at a point. Start, indicates that the directory or file is a hidden directory or file (such as. bashrc). That is, the directory or file is not displayed when you find it by default.

Linux is generally used as a server

The Linux system is a telnet function via the SSH service, and the default SSH service port number is 22. The Linux Telnet Client on window System has SECURECRT, Putty, SSH Secure shell and so on.

Basic properties of Linux files:

The first property of the bin file is denoted by "D". "D" on Linux represents the file as a directory file.

The first character in Linux means that the file is a directory, a file, or a linked file, and so on.

In the following characters, a group of three, each of which is a combination of three parameters, is "rwx". where [R] stands for readable (read), [W] stands for writable (write), [x] stands for executable (execute). Note that the location of the three permissions does not change, and if there is no permission, a minus sign [-] is present.

chgrp: Change file group

Grammar:

[-R] belongs to group name file    Name

chown: Change the owner of a file, or you can change the file group at the same time

Grammar:

[-R] belongs to the  main name  file name  [-R] belongs to the  main name:  The name of the group name
chmod: Change file 9 Properties

There are two ways to set up Linux file attributes, one is a number and one is a symbol.

Linux files have the basic permissions of nine, respectively, owner/group/others three identities each have their own Read/write/execute permissions.

Linux processing directory common commands:

    • LS: List directory
    • CD: Switch directories
    • PWD: Displays the current directory
    • mkdir: Create a new directory
    • RmDir: Delete an empty directory
    • CP: Copying Files or directories
    • RM: Remove files or directories

Use the man [command] to view the use document for each command man CP.

Use the following command to view the contents of a file in a Linux system:

    • Cat starts displaying file contents from the first line
    • The TAC begins with the last line, and you can see that the TAC is backwards written by cat!
    • NL display, the output line number!
    • More page-by-page display file contents
    • Less is similar to more, but better than more, he can page forward!
    • Head's just a few lines.
    • Tail only look at the tail a few lines
Add a new user account using the Useradd command with the following syntax:
Option  user name


Delete Account
Option  User

Modify Account
Option  user name

Linux Disk Management
    • DF: List The overall disk usage of the file system
    • Du: Check Disk space usage
    • FDISK: For disk partitioning

Basic Linux System tutorials and operational learning records

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.