Debian
iso
可以在安装过程连接wifi的
添加网卡驱动
前提是可以插网线上网
添加non-free的安装源到系统中
更新 /etc/apt/sources.list,添加以下记录:
deb http://httpredir.debian.org/debian/ buster main contrib non-free
注意:如果你是 Debian 9 的系统,请把 buster 替换为 stretch,响应的 Debian 8 的系统用 jessie, Debian 7 的系统用 wheezy。
安装无线网卡驱动
在Debian.org 的 WiFi 页面中,我们可以查到,Intel Wireless-N 需要装的驱动为 firmware-iwlwifi。 我们在终端执行更新后,就可以安装 firmware-iwlwifi 了,
sudo apt-get update
sudo apt-get install firmware-iwlwifi
重新载入模块
iwlwifi 模块会自动加载支持的设备,我们重新加载此模块,让它自动加载支持的设备。在终端中执行:
modprobe -r iwlwifi
modprobe iwlwifi
联网
wifi联网
- console模式
cd /etc/network/
vi interface1
2
3
4allow-hotplug wlp6s0
auto wlp6s0 # wlp6s0 无限网卡名称
iface wlp6s0 inet dhcp
wpa-conf /etc/wpa.conf #指定无线网配置文件位置
wpa_passphrase ssid password > /etc/wpa.conf
ssid要连接的无线网名称(比如 Danke111_5G)
网线
cat /etc/network/interfaces.d/enp8s0
1 | # This file describes the network interfaces available on your system |
sudo ifup enp8s0
sudo systemctl restart networking.service
sources
sudo sed -i ‘s/deb.debian.org/mirrors.ustc.edu.cn/g’ /etc/apt/sources.list
YCM
root
1
2
3
4
5atp-get update
apt install git gcc clang cmake vim-nox python3.9-dev build-essential
wget -c https://dl.google.com/go/go1.19.linux-amd64.tar.gz /home/user/go1.19.linux-amd64.tar.gz
tar xvf /home/user/go1.19.linux-amd64.tar.gz -C /usr/local/home
golang1
2
3
4go env -w GO111MODULE="on"
go env -w GOPROXY="https://goproxy.cn,direct"
export PATH=$PATH:/usr/local/go/bin
go version
1 | mkdir -p .vim/bundle |
- vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'Valloric/YouCompleteMe'
Plugin 'https://github.com/Chiel92/vim-autoformat'
call vundle#end() " required
filetype plugin indent on " required
set backspace=indent,eol,start
set autowrite
set number
set mouse=nv
set tabstop=4
set encoding=utf-8
set fencs=utf-8,GB18030,ucs-bom,default,latin1
" jj 保存文件并留在插入模式 [插入模式]
imap jj <ESC>:w<CR>li
" kk 返回Normal模式 插入模式
imap kk <ESC>l
"F3格式化C#快捷键
noremap <F3> :Autoformat<CR>
打开vim 输入 :PluginInstall
idevices(IOS)
1 | apt-get update |
MariaDB
- root
创建
mysql -u root -p123456
source /path/create-databases.sql
或者
DROP DATABASE IF EXISTS fate;
CREATE DATABASE fate DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;;
DROP DATABASE IF EXISTS mysql;
CREATE DATABASE mysql DEFAULT CHARACTER SET utf8mb4;
恢复数据库 实现普通用户不用输入sudo
- ~/.my.cnf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18# The following options will be passed to all MariaDB clients
[client]
# of the '~/.my.cnf' configuration file with an access mode set to 400 or 600.
user = userName
port = 3306
socket = /run/mysqld/mysqld.sock
[mysqld]
bind-address = 127.0.0.1
innodb_file_format=Barracuda
innodb_file_per_table=ON
server-id = 1
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysqld_multi]
mysqld = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin - 复制备份文件到files目录内
mkdir files && cd files
cp /path/26-08-2022/*.gz .
for f in ls
;do gzip -d $f;done
恢复
mysql -u root -p123456 mysql < mysql
查看
mysql -u root -p123456 -Bse ‘show databases’
mysql -u root -p123456
重启服务
systemctl status mysql.service
systemctl restart mysql.service
systemctl status mysql.service
备份
mysql-backup.bash
1 |
|
Xfce4
- uninstall
root
1 | apt purge libexo-2-0 libgarcon-1-0 libxfce4panel-2.0-4 libxfce4ui-2-0 libxfce4ui-common libxfce4ui-utils libxfce4util-bin libxfce4util-common libxfce4util7 libxfconf-0-3 mousepad ristretto task-xfce-desktop thunar xfburn xfce4 xfce4-appfinder xfce4-battery-plugin xfce4-clipman xfce4-clipman-plugin xfce4-cpufreq-plugin xfce4-cpugraph-plugin xfce4-datetime-plugin xfce4-dict xfce4-diskperf-plugin xfce4-fsguard-plugin xfce4-genmon-plugin xfce4-goodies xfce4-helpers xfce4-mailwatch-plugin xfce4-netload-plugin xfce4-notifyd xfce4-panel xfce4-places-plugin xfce4-power-manager xfce4-power-manager-data xfce4-power-manager-plugins xfce4-pulseaudio-plugin xfce4-screenshooter xfce4-sensors-plugin xfce4-session xfce4-settings xfce4-smartbookmark-plugin xfce4-systemload-plugin xfce4-taskmanager xfce4-terminal xfce4-timer-plugin xfce4-verve-plugin xfce4-wavelan-plugin xfce4-weather-plugin xfce4-whiskermenu-plugin xfce4-xkb-plugin xfconf xfdesktop4 xfdesktop4-data xfwm4 exo-utils libxfce4ui-common thunar xfce4-clipman xfce4-helpers xfce4-notifyd xfce4-panel xfce4-power-manager xfce4-session xfce4-settings xfce4-whiskermenu-plugin |
MATE
install
1
2
3
4
5
6
7
8
9apt install mate-tweak
apt install mate-desktop-environment-core
apt install mate-desktop-environment-extras
apt install mate-desktop-environment
# 到这里在tty startx 可以正常启动
##下面这个都是第三方的组件 比如NM任务栏网络管理模块libreoffice.....
apt install task-mate-desktopremove
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
apt purge mate-tweak
apt purge mate-desktop-environment-core
apt purge mate-desktop-environment-extras
apt purge mate-desktop-environment
##下面这个都是第三方的组件 比如NM任务栏网络管理模块libreoffice.....
apt purge task-mate-desktop
apt purge `dpkg --get-selections | grep mate | cut -f 1`
apt -f install
apt purge `dpkg --get-selections | grep depurge | cut -f 1`
apt -f install
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge
cd /home/usrName
rm -rf .gnupg/*
rm -rf .sudo_as_admin_successful .selected_editor .pki/nssdb/ .lesshst .gphoto/ .dmrc
rm -rf .cache
cd .config
rm -rf autostart/ caja/ fcitx ibus/ mate/ mimeapps.list procps/ user-dirs.* vlc/ atril/ dconf/ enchant/ gtk-3.0/ menus/ pluma/ pluma/
rm -rf .xsession-errors .xsession-errors.old .Xauthority
KDE
- install
1 |
|
系统迁移(rsync)
要排除的目录 –exclude={“/home/userName/.cache/“,”/home/userName/Sync/“,”/home/userName/flutter/.pub-cache/*”}
登入任意linux系统执行
1 | mkdir src dest |
–
1 | localhost:/home/linux # pwd |
更新之前分区的时候最好把UUID指定为原系统的
不指定需要修复grub引导
nftables
Cortafuegos stateful simple
1 | user@host:~$ sudo -i |
生成备份文件
1
root@host:~# nft list ruleset> /etc/simple.ntf
从备份文件恢复
1
nft -f /etc/simple.ntf
开机启动
1
2
3
4
5root@host:~# cp /etc/nftables.conf /etc/nftables.conf.bak
root@host:~# nft list ruleset>> /etc/nftables.conf
root@host:~# systemctl enable nftables.service
DNS
1 | sudo -s |
resolv.conf
vim /etc/resolv.conf
1 | nameserver 8.8.8.8 |