debian配置手册

  1. 配置clash

    • 网络代理配置

      • 设置->网络->网络代理
        1
        2
        3
        http 127.0.0.1 7890
        https 127.0.0.1 7890
        socket 127.0.0.1 7891
    • 开机自启

      1
      sudo nano /etc/systemd/system/clash.service
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      [Unit]
      Description=A rule based proxy in Go for %i.
      After=network.target

      [Service]
      Type=simple
      User=berg
      Restart=on-abort
      ExecStart=/home/berg/.clash/clash -d /home/berg/.clash/

      [Install]
      WantedBy=multi-user.target
      1
      2
      3
      4
      5
      6
      #开启
      sudo systemctl start clash
      #开机自启
      sudo systemctl enable clash
      #查看状态
      sudo systemctl status clash
  2. 修改默认文件名

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    cd ~
    mkdir downloads templates public documents
    rm -rf 公共 模板 视频 图片 文档 下载 音乐 桌面
    xdg-user-dirs-update --set DESKTOP ~/
    xdg-user-dirs-update --set DOWNLOAD ~/downloads
    xdg-user-dirs-update --set TEMPLATES ~/templates
    xdg-user-dirs-update --set PUBLICSHARE ~/public
    xdg-user-dirs-update --set DOCUMENTS ~/documents
    xdg-user-dirs-update --set MUSIC ~/
    xdg-user-dirs-update --set PICTURES ~/
    xdg-user-dirs-update --set VIDEOS ~/
  3. 安装oh-my-zsh

  • 安装zsh

    1
    2
    sudo apt install zsh
    chsh -s /bin/zsh

    重启电脑

  • 下载 oh-my-zsh安装脚本

    1
    wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh
    1
    2
    chmod +x install.sh
    sh install.sh
  • 安装插件

    1. 安装zsh-syntax-highlighting
      1
      git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
    2. 安装zsh-autosuggestions
      1
      git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
    3. 修改/~.zshrc
      1
      plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
  • 配置主题显示当前文件路径 - robbyrussell

    • 修改主题
      1
      nano ~/.oh-my-zsh/themes/robbyrussell.zsh-theme
      更改为以下内容
      1
      2
      3
      4
      5
      6
      local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
      PROMPT='${ret_status} %{$fg[cyan]%}$PWD%{$reset_color%} $(git_prompt_info)'
      ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
      ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
      ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
      ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
  1. 修改grub引导主题
  • 下载主题文件

    https://www.gnome-look.org/browse/

    grub-themes

  • 放置主题文件

    1
    2
    sudo mkdir /usr/share/grub/themes/vimix
    sudo cp /your/path/vimix /usr/share/grub/themes/vimix -rf
  • 修改系统配置

    1
    sudo nano /etc/default/grub
    1
    GRUB_THEME="/usr/share/grub/themes/vimix/theme.txt"
  • 更新配置

    1
    sudo update-grub
  1. 安装nvidia驱动
    sudo apt install linux-header-amd64 dkms
    sudo apt install nvidia-driver

  2. Nvidia改wayland

    1. sudo nano /etc/default/grub
      GRUB_CMDLINE_LINUX_DEFAULT
      #添加 nvidia-drm.modeset=1
      GRUB_CMDLINE_LINUX_DEFAULT=”quiet nvidia-drm.modeset=1”
    2. /etc/gdm3/daemon.conf或者/etc/gdm/custom.conf之类的conf
      将 #WaylandEnable=false 改为WaylandEnable=true
    3. 屏蔽 ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
  3. gnome 缩放因子 %125++…
    gsettings set org.gnome.mutter experimental-features “[‘scale-monitor-framebuffer’]”

  4. 安装字体渲染-infinality

    • sudo nano /etc/apt/sources.list.d/infinality.list

    deb http://ppa.launchpad.net/no1wantdthisname/ppa/ubuntu trusty main
    #deb-src http://ppa.launchpad.net/no1wantdthisname/ppa/ubuntu trusty main

    • sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys E985B27B

    • apt-get update
      apt-get install fontconfig-infinality

  5. 配置系统渲染风格
    sudo bash /etc/fonts/infinality/infctl.sh setstyle

  6. 安装ubuntu字体

    1
    2
    3
    4
    5
    6
    wget http://mirrors.kernel.org/ubuntu/pool/main/u/ubuntu-font-family-sources/ttf-ubuntu-font-family_0.80-0ubuntu6_all.deb

    sudo mv ./ttf-ubuntu-font-family_0.80-0ubuntu6_all.deb /tmp

    sudo apt install ./ttf-ubuntu-font-family_0.80-0ubuntu6_all.deb


debian配置手册
http://example.com/2020/04/10/debian配置手册/
作者
bergzha
发布于
2020年4月10日
许可协议