Difference between revisions of "Basic"
From AlphaBook
(→Process) |
|||
Line 46: | Line 46: | ||
== Process == | == Process == | ||
* top | * top | ||
− | * ps aux | grep programname | + | * ps -aux | grep programname | grep -v grep |
* kill -9 pidnumber | * kill -9 pidnumber |
Revision as of 14:17, 26 September 2018
apt-get
- sudo apt-get update
- sudo apt-get install net-tools
- sudo apt-get install vim
- sudo vim /etc/apt/sources.list
Network
- List network adaptors
- ip a
- sudo vim /etc/netplan/01-network-manager-all.yaml
- network:
- version: 2
- renderer: NetworkManager
- ethernets:
- ens33:
- addresses: [192.168.200.55/24]
- gateway4: 192.168.200.1
- ens33:
- sudo netplan apply
- /etc/resolv.conf
- name server 114.114.114
- search corp.alphabook.cn
- Command 'ifconfig' not found, but can be installed with:
- sudo apt install net-tools
SSH
- sudo apt-get install openssh-server
- sudo vim /etc/ssh/sshd_config
- sudo service ssh restart
Service
- sudo systemctl status ssh
- sudo systemctl start ssh
- sudo systemctl stop ssh
- sudo systemctl restart ssh
- sudo systemctl reload ssh
- sudo systemctl enable ssh
- sudo systemctl disable ssh
- sudo systemctl is-enabled ssh
- sudo systemctl is-active ssh
- sudo systemctl show ssh
Process
- top
- ps -aux | grep programname | grep -v grep
- kill -9 pidnumber