Linux and Shell Learning

Source: Internet
Author: User
Tags ssh secure shell

sudo spctl--master-disable open application from any source when installed;

sudo lsof-i:9000;sodu kill-9 pid; View port occupancy and kill process;

The Rmic compiler generates stub classes and skeleton classes;

/home Install software

  • Boot of the kernel
    • /boot
  • Run Init
    • SysV: init, before CentOS 5, configuration file:/etc/inittab.
    • Upstart: init,centos 6, configuration file:/etc/inittab,/etc/init/*.conf.
    • Systemd: Systemd, CentOS 7, configuration file:/usr/lib/systemd/system,/etc/systemd/system.
      • Daemon
      • RunLevel
  • System initialization
  • Set up terminal
  • User Login System
  • System directory Structure
    • /bin common command/boot link mirror/dev external device/etc System Management/home directory/lib dynamic connection shared library
    • /lost+found illegal shutdown/media External device Mount/mnt temporary media/opt software/proc memory/root Super Permissions home Directory
    • /sbin hypervisor/selinux Firewall/srv service data/sys (proc+devfs+devpts)/tmp Temporary
    • /usr (program Files)/usr/bin\sbin (Bin and sbin)/usr/src kernel source code. /VAR (variable)
      • 3s-e-single-passwd
  • Telnet securecrt,putty,ssh Secure shell;ssh-p (port)
  • File properties
    • ll or Ls-l
    • D Directory-File L link B can be random access device C disposable reading device
    • Chgrp-r recursive owner Grouper/chown-r owner:grouper filer/chmod-r xyz filer (X1R2W4)/
    • chmod o/g/u/a (comma interval) +-= xrw file
    • Cat
    • nl
    • Tac
    • More/less
    • Useradd-c comment-d dir-g group-g apgroup-s shelldir (-u-o) [etc/passwd ...] [Userconf]
    • Userdel-r Name
    • Usermod (useradd command) name
    • Passwd-l lock-u unlock-d dis-f first-next
    • Groupadd-g Gid-o/groupdel/groupmod
    • NEWGRP Name
    • /etc/(Passwd,shadow,group)
    • nweusers< (txt written in passwd format);passwd< (txt in name:pwd format)
    • Pwunconv Cancel Shadow Password;pwconv enable Shadow password
    • DF (File system usage) du (disk space usage) fdisk (partition)
  • Shell
    • Suffix can be changed casually
    • $ (#var) length $ (var:startInd:endInd) intercept ' expr index ' ${var} ' var_s ' Lookup
    • Array variable values are separated by spaces or newline var[@] get array all elements (var[*] should also be possible)
    • #var删除左起至第一var%var Delete right up to first Var # #删除左起至最后var%%var Delete right up to last Var
    • Var=holyshit ${var:7}=t ${var:1-2:3}=t (on the right) $ (the last position in the var:1-2}=t string is 0 The first one is 1; or the last position is-1
    • For i in "[email protected]";d o
      • Echo $i
    • Done
    • + - * / % = == !=
    • -eq-lt-gt-ge-le-ne
    • ! -o-a
    • && | |
    • = (there are spaces)! =-z-n Str ([var]) This was about the characters operation.
    • -E (exit)-S ()-X (excutable)-W (writable)-R (readable)-f (file?)-D (dir?)
    • ECHO-E Open Escape "" to use text format directly
    • Test is bound with []
    • file contains. File/source file
    • redirect >> output append;

Linux and Shell Learning

Related Article

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.