linux initial, understand the concept of rights, as well as yum install execute permissions in the directory which require additions and deletions to check important directory under Linux, and vim, gcc, gdb, git, lrzsz of

- ** which requires permission to access the directory, check implementation of additions and deletions in the directory (cd, touch, ls, rm, mv, etc.) to change file actions, which need permission **.

Permissions: Linux systems have each file and directory access permissions, use it to determine who can access and manipulate files and directories by what means. Access to the file or directory is divided into read-only, write-only, and can perform three.
    Read-only permission represents only allowed to read its contents, and forbid them to do all the changing operation. It represents the file executable permissions allow execution as a program. When the file is created, the file owner automatically has read the file, write, and execute permissions easier to read and modifications to the file.
    There are three different types of users can access the file or directory: file owner, user group with other users. Owner generally is the creator of the file. Group owners can allow user has access to the same file, but also will be given access to the files of other users in the system. In this case, the system that each user can access a file or directory owned by that user.
Access permissions for each file or directory has three groups, each represented by three, respectively owner of the file read, write, and execute permissions of the Lord; and the user's home belongs to the same group read, write, and execute permissions; in other systems users read, write, and execute permissions. When the display comprehensive information about the file or directory with ls -l command, the leftmost as access to files.
    r (read 4): For a file, the file has permission to read, for a directory, the directory has permission to view.
     w (write 2): The document, has the authority to modify files for directory, has removed the authority of the mobile directory.
    x (execution 1): execute the file, the file has permission to perform, for the catalog, has permission to access the directory.
    
cd change the current command is the path (into the specified directory), you need to perform (x);
Touch command is if the file does not create an empty file exists, otherwise use the current system time refresh time attributes, you need the executable (x) and write (w);
LS command is the default display the contents of the current directory, you need the executable (x) and readable (r);
RM command is to delete the normal files, you need to perform (x) and write (w);
mv command is a file / directory to a specific location, need executable (x) and write (w).
    
- ** find information for important directory under the Linux / proc, / sys, / SElinux, / bin, / usr / lib, / usr / local, / var, / tmp **


/ proc: This directory is a virtual directory, which is the system memory map, we can get system information directly by accessing the directory. In other words, the contents of this directory on the hard disk but not in memory.
/ sys: Linux kernel file system access.
/ SELinux: SELinux is based on field - type model (domain-type) mandatory access control (MAC) security system, and it is designed to be written by the NSA kernel module into the kernel comprises a respective safety-related applications are some SELinux was beaten patch, finally, a corresponding security policy.
/ bin: storing the user command with the longest, such as: cp, ls, cat, and the like. 
/ usr / lib contains more library files for user program. (/ lib is a kernel-level, / usr / lib is a system level).
/ usr / local system administrators to install their own software locally, there are bin, sbin, lib, etc. (/ usr / local user level).
/ var This directory is for things continue to expand, in order to maintain a relatively stable usr, and those are often revised catalog can be placed in this directory, such as / var / log log file.
/ tmp: temporary staging point files.
- ** to find information and learn about these important command du, df, top, free, pstack, su, sudo (sudo -, sudo -s)., Adduser, password **

 

du - reports disk space usage

       -a displays statistics for all of the files involved, not just Include subdirectories.

       -k 1024 bytes as the counts, instead of the default when the 512-byte counts.

       -x use of space output only specified parameters, including but not subdirectories under it.

       -s statistics only space on the same device used by the specified parameters.

df - Usage report file system disk space

top - provides real-time processor of the system of state prison monitoring; displaying resource usage status of each process in the system.

free - the sum of the memory display system used and unused

        -b option to display the sum of memory bytes; -k option (default) display in KB; -m option in MB.

        -t option displays a Total row.

       -O option disables the display "buffer adjusted" line. Unless specified free from the (corresponding) used / unused memory minus / plus buffer memory.

       -s delay to make free second intervals, continuous sampling display. delay may be provided to float, it (3) do microsecond delay with usleep.

       -V Display version information.
Pstak - to display the stack trace for each process. It must be run by the owner or root corresponding process. Pstack can be used to determine the process is hung.

su - Replace user and group identification run shell

sudo - Ordinary users can use root privileges to perform the specified command

        -s execution environment variables specified in the SHELL shell, or / etc / passwd in the specified shell

       - option indicates that sudo should stop processing command line arguments

useradd - Create a new user or update default new user information

password - change password

- ** find information, learn how to use the command to install gcc / g ++, gdb, vim **


1. First to root user input commands ** su root **;
case 2 held networking, input commands
    ** yum install vim ** --- text editor
        ** yum install gcc ** --- program compilation tools
        ** yum install gdb ** --- debugging tool
       ** yum install git ** --- version control
        ** yum install lrzsz ** --- file transfer tools
are commonly used to install software ** vim , gcc, gdb, git, lrzsz . **
     

 

 

 


 

Guess you like

Origin blog.csdn.net/qq_43210641/article/details/89258933