Linux IntroductionI. Common operating system (OS)WindownsAndroidIosLinuxUnixOS XIi. Introduction of Linux1, Linux features:(1) free use, free, open source.(2) Multi-user, multi-tasking, multi-threading, multi-CPULinux (free of charge) is based on
First, real-time viewComputer consumption of memory is generallyUse the top command to view, CPU, memory, usage, real-time data; exit with Q-key or Ctrl +cTop Results interpretationTop-01:47:27 up, 2 users, load average:0.00, 0.03, 0.05tasks:154
The ACL can only be a root administrator user. Related commands:getfacl,setfaclaclBasic usage//环境准备[[email protected] ~]# cp /etc/passwd /root/passwd//文件在没有设定acl, 看到的和传统权限是一样[[email protected] ~]# ll passwd-rw-r--r-- 1 root root 0 10-26 13:59
hostname 显示文件内容尾部Syntax format: hostname "option" "File" hostname [options] [options]Note: There must be at least one space between each element in the hostname command and in the options and options that follow.Option Description:
Requires two computers, the IP address is:Service side: 192.168.1.182Client: 192.168.1.183Configuring a key pair to log on to a remote hostClient host production secret keyA. Production secret key[[email protected] ~]# ssh-keygen-t RSAB. Push the
1. PS aux | grep nginxUsage scenario: You want to check the Nginx print log, and do not know the Nginx log path.PS: is the command to view the process. Use this command to determine which processes are running and running, whether the process is
Screen similar to a container, you can put the current foreground running Application Shell window closed without affecting the operation, and after the nohup a bit similar, but I think it is more useful than nohupUsage 1:ScreenThen it pops up a new
1. REDIRECT Symbol01, > Output redirection first empty the file, append02, >> Append output redirect Append03. 04. Cat appends multiple lines to a file.Cat >>/oldboy/alex.txtLove Me, Love my dog.Love Li, Love li ' s dog.Eof2, the position of the01,.
1, for a file, user classificationMaster, family, strangers.UID and GIDUID indicates ID number of user IDGID represents the ID account number of Group ID user groups2. User classification in the system1) Root Super Admin Emperor 02) Puppet user
sudo 以另一个用户身份执行命令Syntax format: sudo "option" sudo [options]Note: There must be at least one space between each element in the sudo command and subsequent options and filesParameter options:-L, which lists the commands that the current user can
First, work management
Put the command in the background to perform "&"
[[email protected] ~]# for n in ' Seq 10000 '; do echo $n >>/tmp/test.txt;done & # # #在命令的后面接 & put the command in the background execute [ 1 ] 1446 ######[1]
I. User's primary and secondary groups.goups command to view the group that the current user belongs toThe first one is the primary group, and the next is the secondary groupSummary: That user created the directory (file), the directory (file) of
1, how to obtain/etc/passwdThe file's permissions correspond to the digital content, such asrw-r--r--to be644, requiring the use of commands to obtain644such a numberStat File | sed-nr ' s#^.* \ (0 (. *)/-.*$#\1#GP ' # here \ ( Yes Yes ( escapedStat
visudo 编辑 sudoers 文件Syntax format: visudo "option" su [option]Attention:
Visudo command and subsequent options and user names, there must be at least one space between each element
The Visudo command is specifically used to edit
First, delete special characters files/foldersLs-i the inode of the file, and then use the Find command to delete[localhost] ls -ilrt100985 -rw-r--r-- 1 TBCs users 0 One: -mxv9.log100985 of the first column is the inode of the file,
Security colleague through Nusses scan found a server has SSH1 vulnerability: tcp/22:10882-ssh Protocol Version 1 Session Key retrieval. Usually because of useless ssh1, decided to close it.ip:172.168.9.54Os:suse10 SP31. Modify the configuration
Linux Network configuration~]# ifconfig View IP~]# ifup eth0 Boot nic~]# cd/etc/sysconfig/network-scripts/==> nic configuration file under/etc/sysconfig/network-scripts~]# ls-l ==> List The contents of the folder, find Ifcfg-ens33~]# vi ifcfg-ens33 =
1.useradd Add user-G first Group-G-Time group-D specified directory-p (passwd) password-u (UID)2.userdel Delete UserUsage: # useradd xiaodandan-g xiaodaodan-p 111111 explanation Create a new user Xiaodandan, user group is Xiaodandan, password 6
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