view source 01 # /etc/crontab: system-wide crontab 02 # Unlike any other crontab you don't have to run the `crontab' 03 # command to install the new version when you edit this file 04 # and files in /etc/cron.d. These files also have username fields, 05 # that none of the other crontabs do. 06 <!-- more --> 07 SHELL=/bin/sh 08 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 09 10 # m h dom mon dow user command 11 17 * * * * root cd / && run-parts --report /etc/cron.hourly 12 25 6 * * * root test -x /usr/sbin/anacron ( cd / && run-parts --report /etc/cron.daily ) 13 47 6 * * 7 root test -x /usr/sbin/anacron ( cd / && run-parts --report /etc/cron.weekly ) 14 52 6 1 * * root test -x /usr/sbin/anacron ( cd / && run-parts --report /etc/cron.monthly ) 15 # 16 @reboot root /root/rules.sh
root@test:/# fdisk /dev/sdb Welcome to fdisk (util-linux 2.27.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): n Partition type p primary (1 primary, 0 extended, 3 free) e extended (container for logical partitions) Select (default p): p Partition number (2-4, default 2): 2 First sector (651175056-1953525167, default 651175936): Last sector, +sectors or +size{K,M,G,T,P} (651175936-1953525167, default 1953525167): 1302350111 Created a new partition 2 of type 'Linux' and of size 310.5 GiB. Command (m for help): wq The partition table has been altered. Calling ioctl() to re-read partition table.
如果遇到提示Re-reading the partition table failed.: Device or resource busy 用命令partprobe 初始化分区
• 自动删除 /var/cache/apt/archives/ 下的所有 .deb 文件。 固定 MAC 地址 N1 的 MAC 地址每次重启都会变化,导致 IP 不固定,因此需要固定 MAC 地址。
1
nano /etc/network/interfaces
在 iface eth0 inet dhcp(或 static)这行下面,添加一行:
1
pre-up ifconfig eth0 hw ether 52:d1:87:32:33:eb
换源 Debian 版本换源 Stretch 版本
1
nano /etc/apt/sources.list
删除所有内容,并替换为以下内容:
1 2 3 4 5 6 7 8
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main non-free contrib deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main non-free contrib deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main non-free contrib deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main non-free contrib deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main non-free contrib deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main non-free contrib deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main non-free contrib deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main non-free contrib
Buster 版本
1
nano /etc/apt/sources.list
删除所有内容,并替换为以下内容:
1 2 3 4 5 6 7 8
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
Armbian 版本换源 Bionic 版本
1
nano /etc/apt/sources.list.d/armbian.list
注释掉原有的行,并添加以下内容:
1
deb https://mirrors.tuna.tsinghua.edu.cn/armbian bionic main bionic-utils bionic-desktop