1. Display $ After logging in, use the table can not be automatically filled, open bash
bash
2. can not use the ll command
alias ll = 'ls -alF'
3. Delete the file / folder
rm -f / rm -rf
4. Rename Folder A-> B
Music Videos AB
5.ftp command
login:
the FTP hostname Port
username
passwd
the FTP -> Open Host
Path:
FTP lcd with local switching paths, with the switching paths cd remote server.
cd directory name (directory into the server) lcd directory name (to enter the local directory)
cd \ (retreated server root directory) lcd \ (retreated native root directory)
cd ... (to return to the parent directory) lcd ... (return to the parent directory)
! the dir (directory shows the machine when the pro content) the dir (directory contents of the current display server)
文件:
get filename
put/send filename
6.top
dynamic view of the operation of the system processes
7.nice
to specify the priority of a process running
nice -9 ./while.py priority to run the program 9
sudo nice --9 ./while.py priority to run the program -9
renice n PID modify a the priority of running processes
8.ps
ps -A
ps -afx
ps aux
9. Check kernel version
uname -r
10. Check the operating system version
CAT / proc / Version
CAT / etc / Issue
11.netstat
the netstat -IN
I: Interface
n: ip address
rn: See route (== route)
12.arp -a
view the arp cache
13.arp -d
delete arp cache entry
14.ping
15.tracepath
-I ens33 -nN ICMP 16.tcpdump
I: Interface
nn: Internet Protocol
17.route add
add routes
18.cat / proc / sys / net / ipv4 / ip_forward
see if the routing and forwarding support
Alternatively string file 19.
The files in the current directory of all strings "src" is replaced with "sbu1" (case sensitive)
Sed -i "S / the src / sbu1 / G" grep "src" -rl ./
Sed -i "S / the SRC / SBU1 / g "grep "SRC" -rl ./
20.apt-get install packagename
出现E:packagename has no installation candidate
解决:
apt-get update
apt-get upgrade
apt-get install packagename
21. Modify the default source (apt-get package source)
after installing Ubuntu 18.04, the use of foreign sources too slow, modified to domestic sources will be much faster.
Ali modify source Ubuntu 18.04 default source
backup /etc/apt/sources.list
cp /etc/apt/sources.list /etc/apt/sources.list.bak
added in front of the /etc/apt/sources.list file the following entries
added Ali source:
deb http://mirrors.aliyun.com/ubuntu/ Bionic main Tel Restricted Universe Multiverse
deb http://mirrors.aliyun.com/ubuntu/ Bionic-Security main Tel Restricted Universe Multiverse
deb HTTP: // Mirrors. aliyun.com/ubuntu/ Bionic-Restricted Universe Multiverse main Updates
the deb http://mirrors.aliyun.com/ubuntu/ Bionic Proposed main-Restricted Universe Multiverse
the deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
最后执行如下命令更新源:
sudo apt-get update
sudo apt-get upgrade
另外其他几个国内源如下:
中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
163源
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
22. Modify ubuntu (16.04 or more) default run level
systemctl set-default multi-user.target
23. Check whether the CPU supports virtualization
egrep -o '(VMX | SVM)' / proc / cpuinfo
egrep '(VMX | SVM)' / proc / cpuinfo
24. The KVM installation environment (nested virtualization)
the sudo the install APT-GET-KVM QEMU QEMU -Y-System the libvirt-bin-utils the virt-Bridge Manager VLAN
25.安装openvswitch
apt-get install openvswitch-switch
26.安装docker
apt install docker.io
27.docker加速
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://95822026.m.daocloud.io
systemctl restart docker.service
28.ubuntu install PCRE library
apt-get install libpcre3 libpcre3-dev