Hello, Debian!
Command
Reboot
- shutdown -r now ----------------------------# reboot now
- shutdown -r 10 ------------------------------# reboot in 10 minutes
- shutdown -r 20:35 --------------------------# reboot at 20:35
Entering shutdown -c
to to cancel the reboot when using shutdown command to reboot.
Poweroff
- halt --------------------------------------------# poweroff now(use
-p
to turn off the power)
- poweroff -------------------------------------# poweroff now
- shutdown -h now ---------------------------# poweroff now
- shutdown -h 10 -----------------------------# poweroff in 10 minutes
Entering shutdown -c
to to cancel the poweroff when using shutdown command to power off.
System
- uptime --------------------------------------------#
- apt-get install <>=<> -----------# 安装指定指定版本: apt-get -y install nginx=1.14.2-1~xenial
- ip addr ---------------# Check IP address.
- ip a ---------------# Check IP address.
- ip address show ---------------# Check IP address.
- ip -br -c a ---------------# Check IP address.
- telnet xxx.xxx.xxx.xxx 22 ---------# Check port number
- route -n -----------------# Show route information
- ls --color ---------------# Show color in terminal
- vi ~/.bashrc ------------------# 如何让debian终端显示颜色?
- pmset -g batt ---------------# Check battery status
- factor
TD
- touch name.format -------------------------# To create a new file.
- cat name.format ----------------------------# To preview the contents.
- apt list --installed --------------------------# 这个会显示使用 apt 命令安装的所有的软件包。同时也会包含由于依赖而被安装的软件包。也就是说不仅会包含你曾经安装的程序,而且会包含大量库文件和间接安装的软件包。
- apt list --installed | grep program_name ------# 可以检索出使用 .deb 软件包文件安装的软件。由于列出出来的已安装的软件包太多,用 grep 过滤特定的软件包是一个比较好的办法。
- dpkg-query -l --------------------------#
- 修改sshd_config文件,命令为: vi /etc/ssh/sshd_config
- 启动SSH服务,命令为: /etc/init.d/ssh start // 或者service ssh start
- 验证SSH服务状态,命令为: /etc/init.d/ssh status
- 添加开机自启动 update-rc.d ssh enable
- cat >> /etc/ssh/sshd_config << EOF
PasswordAuthentication yes
PermitRootLogin yes
EOF
service ssh restart
- /etc/init.d/ssh status
Other
Installation
- speedtest
- neofetch
- htop
- apache2
- sl
- libaa-bin $ aafire
- cmatrix
- oneko
- toilet
- ASCII
Installation TD
Home