Difference between revisions of "Basic"
From AlphaBook
(→Error) |
(→Error) |
||
Line 49: | Line 49: | ||
* kill -9 pidnumber | * kill -9 pidnumber | ||
− | == Error | + | == Error: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable) == |
− | + | * sudo rm /var/lib/apt/lists/lock | |
− | + | * sudo rm /var/cache/apt/archives/lock | |
− | + | * sudo rm /var/lib/dpkg/lock | |
− | + | * sudo dpkg --configure -a | |
− |
Revision as of 13:07, 28 September 2018
Contents
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
- sudo rm /var/lib/apt/lists/lock
- sudo rm /var/cache/apt/archives/lock
- sudo rm /var/lib/dpkg/lock
- sudo dpkg --configure -a