debian常用命令

#修改系统所用时区
timedatectl set-timezone Asia/Shanghai

#升级apt
#apt-get purge
stty erase ^H
apt-get update -y
apt update -y
apt upgrade
apt-get install sudo

#安装curl
apt-get install curl -y

#安装vim
apt-get install vim -y

#禁用ipv6
vim /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
/sbin/sysctl -p

#xray设置ipv4出站
    {
        "protocol": "freedom",
        "settings": {
          "domainStrategy": "UseIPv4"
        }
    },

#谷歌ipv6 dns
2001:4860:4860::8888
2001:4860:4860::8844

#修改默认端口
vim /etc/ssh/sshd_config
service ssh restart

#清除登录失败日志
echo > /var/log/btmp

#更改dns
vim /etc/resolv.conf

#回程路由测试
wget -qO- git.io/besttrace | bash

#性能测试
curl -sL yabs.sh | bash -s -- -i
bash <(wget -qO- bash.spiritlhl.net/ecs)

#dd系统
bash <(wget --no-check-certificate -qO- 'https://www.moeelf.com/attachment/LinuxShell/InstallNET.sh') -d 11.5 -v 64 -a
MoeClub.org   #默认密码
passwd root     #重置密码
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -p "密码" -port "端口"    #未测试

#流媒体检测
bash <(curl -L -s https://git.io/JRw8R)

#安装防火墙,
apt-get install ufw

#添加/删除防火墙端口
ufw allow 9621
ufw delete allow 22

#状态/开启/关闭防火墙
ufw status
ufw enable
ufw disable

#安装pip3
apt-get install python3-pip
apt-get install python3-tk

#安装xrdp
apt install xrdp
vim /etc/xrdp/xrdp.ini
port=10622
systemctl status xrdp
systemctl restart xrdp

#新建用户
adduser+用户名

#安装图形界面
apt install xfce4
apt install xfce4-goodies
#apt-get install lxde
apt-get install locales
dpkg-reconfigure locales
apt-get -y install ttf-wqy-zenhei xfonts-intl-chinese wqy*
apt-get -y install ibus  ibus-pinyin im-switch
reboot
打开文件夹 > 编辑 > 偏好设置 > 高级 > 终端模拟器 > lxterminal -e %s

#安装deb
sudo dpkg -i package_file.deb

#安装chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google-chrome*;apt-get -f install -y
vim /usr/bin/google-chrome
属性命令里加--no-sandbox

#安装ifconfig
apt install net-tools

#安装sqlitebrowser
sudo apt-get install sqlitebrowser

#安装libreoffice
https://zh-cn.libreoffice.org/get-help/install-howto/linux/

#安装wine
apt install wine
dpkg --add-architecture i386 && apt-get update && apt-get install wine32
winecfg
wine hfs.exe

#搭建wordpress
wget https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install.sh
sudo bash hst-install.sh --apache no --phpfpm yes --multiphp no --vsftpd no --proftpd yes --named no --mysql yes --postgresql no --exim no --dovecot no --sieve no --clamav no --spamassassin no --iptables yes --fail2ban yes --quota no --api yes --interactive no --hostname 子域名 --email 邮箱 --password 密码 --with-debs no  --port '9621' --lang zh-cn  --force

#PVE挂载磁盘
sudo fdisk -l
sudo fdisk /dev/sda
输入n,默认,w保存
sudo mkdir /mnt/ssd
sudo mkfs.ext4 /dev/sda1
sudo mount /dev/sda1 /mnt/ssd
vim /etc/fstab
/dev/sda1 /mnt/ssd ext4 defaults 0 2
数据中心-存储-添加
DISM /online /Set-Edition:ServerDatacenter /ProductKey:W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9 /AcceptEula
DISM /online /Set-Edition:ServerDatacenter /ProductKey:WX4NM-KYWYW-QJJR4-XV3QB-6VM33 /AcceptEula

#outlook恢复码
6VCWM-G229G-KC4PB-KS96R-VXEYE
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容