[](#)JavaJava
- [ ](#-)
- [1.1 ](#11-)
- [1.2 ](#12-)
- [ Linux](#-linux)
- [2.1 Linux](#21-linux)
- [2.2 Linux](#22-linux)
- [2.3 Linux](#23-linux)
- [ Linux](#-linux)
- [3.1 Linux](#31-linux)
- [3.2 ](#32-)
- [ Linux](#-linux)
- [4.1 ](#41-)
- [4.2 ](#42-)
- [4.3 ](#43-)
- [4.4 ](#44-)
- [4.5 Linux](#45-linux)
- [4.6 Linux ](#46-linux-)
- [4.7 Linux](#47-linux)
- [4.8 ](#48-)
GithubLinux(Java)
> Linux
##
### 1.1
- **Operation SystemOS**
- ** **
- ** **
- ****

### 1.2
1. **Windows:**
2. **Unix** .Unix /

3. **Linux:** LinuxUnix.LinuxLinux **Linux** LinuxLinuxLinuxLinuxLinuxGNU

### 1.3
**:
[](https://www.jianshu.com/p/85e931636f27) (,,)**
LinuxLinux
Linux:Debian,RedHat,Ubuntu,Suse,Centeos
###
unixlinux

#### ?
cpu
cpu**()****()**
****
* (,): ****
* : ****
,
* :
####
* :
* : cpu
* : cpu
cpu
#### RAM(Random Access Memory )
CPU
#### (Virtual Memory)
****
windowsLinuxswap
#### Swap
:
(:LRU)
Swap
()
## Linux
### 2.1 Linux
Linux
- **Unix** LinuxUnix
- **Linux** LinuxLinux
- **Linux** LinuxLinuxGit

### 2.2 Linux
- 1991Linus TorvaldsMinixUnixftpLinux GNU;
- Linux
### 2.3 Linux
**Linux**
1. **** LinuxLinuxI/O
2. **** LinuxubuntuCentOSCentOS

## Linux
### 3.1 Linux
**Linux**
LINUX****UNIXLinuxUNIXUNIXUNIX
### 3.2 Inode
inodelinux/unixinode
#### Inode??
(Sector),512(0.5kb)
**
(block)4kb
8**
metadata
**inode inode
stat inodeinode
Linux/Unixinode**
**inode2
inode
inodeinode table**
inode:

### 3.3
**Linux:
Socket

- : txt,html,pdf
- :

- : ()
- (Hard Link):inodeinode
2inode
inodeinode
inode,
,
- ()(Symbolic Link): Windows
:

-
,/dev
- : **
/**
- : **
windows**
****
: "word"
word()
- : mkfifo
- Socket: 2Socket
### Linux
**Linux**
Linux

****
- **/bin** (lscatmkdir)
- **/etc**
- **/home** user/home/user~user
- **/usr **
- **/opt** tomcat
- **/proc**
- **/root** ^o^
- **/sbin:** rootifconfig
- **/dev**
- **/mnt**
- **/boot**
- **/lib **
- **/tmp**
- **/var**
- **/lost+found** windows.chk
## Linux
Linux
Linux[http://man.linuxde.net/](http://man.linuxde.net/)
### 4.1
- **`cd usr`** usr
- **`cd ..cd../`**
- **`cd /`**
- **`cd ~`**
- **`cd -`**
### 4.2 ()
1. **`mkdir `**
2. **`lsll`**llls -lll
3. **`find `**
- : `find .`
- `/home`.txt:`find /home -name "*.txt"`
- : `find /home -iname "*.txt"`
- .txt.pdf:`find . \( -name "*.txt" -o -name "*.pdf" \)``find . -name "*.txt" -o -name "*.pdf" `
4. **`mv `**
mv mvmv
5. **`mv `** ---
mvmvcpmvcp
6. **`cp -r `** -r
cp -r
7. **`rm [-rf] `:**
rm `rm -rf` //
### 4.3 ()
1. **`touch `:**
2. **`cat/more/less/tail `**
- **`cat`**
- **`more`** q
- **`less`** PgUpPgDn q
- **`tail-10` ** 10Ctrl+C
tail -f tomcat tail -f catalina-2016-11-11.log
3. **`vim `**
vimLinuxvivimvim
**vim**
vim ------>----->------>i-----> ------->Esc----->wq/q! wqq!
4. **`rm -rf `**
`rm -rf`
### 4.4
**1**
Linux.tar.gz
.tar.gz
**`tar -zcvf `**
zgzip
c
v
f
testaaa.txt bbb.txt ccc.txttesttest.tar.gz**`tar -zcvf test.tar.gz aaa.txt bbb.txt ccc.txt``tar -zcvf test.tar.gz /test/`**
**2**
tar [-xvf]
x
1 /testtest.tar.gz**`tar -xvf test.tar.gz`**
2 /testtest.tar.gz/usr:**`tar -xvf test.tar.gz -C /usr`**- C
### 4.5 Linux
Linux(readable)(writable)(excutable)(owner)(group)(other) **`ls -l`**
`ls -l`


> Linux
****
- d
- -
- l window
**Linux**
- rr4
- ww2
- xx1
****
| | |
| :-------- | --------:|
| r | cat |
|w | |
| x | |
| | |
| :-------- | --------:|
| r | |
|w | |
| x | cd |
**000**
**linuxlinux**
- ****
ls ahl chown
- ****
ls ahl chgrp
- ****
> /
**/`chmod`**
/testaaa.txt
**`chmod u=rwx,g=rw,o=r aaa.txt`**
**`chmod -R u=rwx,g=rwx,o=rwx ./log`** // log

chmod 764 aaa.txt
**:**
zookeeper
1. zookeeper
2. zookeeper:`chmod +x zookeeper`
3. zookeeper` chkconfig --add zookeeper`
4. `chkconfig --list`
### 4.6 Linux
Linux
**Linux:**
- `useradd `:
- `userdel `:
- `usermod `:
- `passwd `:
- `passwd -S ` :
- `passwd -d `:
useraddLinuxuseraddpasswduserdeluseradd/etc/passwd
passwd
### 4.7 Linux
Linux Linux
/etc/group
**Linux:**
- `groupadd ` :
- `groupdel `:
- `groupmod ` :
### 4.8
- **`pwd`**
- `sudo + ` sudo root
- **`grep --color`** --color
- **`ps -ef`/`ps -aux`** **`ps aux|grep redis`** redis `pgrep redis -a`
psProcess Statusgrep
- **`kill -9 pid`** -9
pskill
- ****
- ifconfig
- ping
- netstat -an
- **net-tools iproute2 **
`net-tools`BSDTCP/IPLinux2001LinuxLinuxArch LinuxCentOS/RHEL 7net-tools`iproute2`linux ipifconfig[LinuxIP](https://linoxide.com/linux-command/use-ip-command-linux)
- **`shutdown`** `shutdown -h now` `shutdown +5 "System will shutdown after 5 minutes"`5
- **`reboot`** **`reboot`** **`reboot -w`**
##
**Java:** JavaV2.0 PDF [](#) **"Java"**
**Java:** Java **1**
