美文网首页
Manjaro Note

Manjaro Note

作者: Mr蓝色天际 | 来源:发表于2020-02-20 00:07 被阅读0次

    一、换源

    1.如果不换源,Pacman下载速度会特别慢。

    sudo pacman -Syy
    sudo pacman-mirrors -i -c China -m rank
    sudo pacman -Syy
    

    这里我选的是上海交大的软件源sjtu

    2.安装Vim编辑器,方便编辑配置文件

    sudo pacman -S vim neovim
    

    3.增加archlinuxcn软件源并安装archlinuxcn-keyring

    使用root权限编辑/etc/pacman.conf

    sudo vim /etc/pacman.conf
    

    增加archlinuxcn软件源,我选的是上海交大sjtu的源

    [archlinuxcn]
    SigLevel = Optional TrustedOnly
    Server = https://mirrors.sjtug.sjtu.edu.cn/archlinux-cn/$arch
    

    安装archlinuxcn-keyring

    sudo pacman -Syy && sudo pacman -S archlinuxcn-keyring
    

    4.解决中文

    1.将中文主目录变更为英文

    sudo pacman -S xdg-user-dirs-gtk
    export LANG=en_US
    xdg-user-dirs-gtk-update
    

    然后会有个窗口提示语言更改,更新名称为英文即可

    export LANG=zh_CN.UTF-8
    

    然后注销重新登录或重启电脑如果提示语言更改,保留旧的名称即可

    2.安装常规中文字体

    常规的Linux系统中文字体都很缺乏,需要自己安装

    sudo pacman -S ttf-roboto noto-fonts ttf-dejavu wqy-bitmapfont wqy-microhei wqy-microhei-lite wqy-zenhei noto-fonts-cjk adobe-source-han-sans-cn-fonts adobe-source-han-serif-cn-fonts
    # 文泉驿wqy-bitmapfont wqy-microhei wqy-microhei-lite wqy-zenhei
    # 思源字体noto-fonts-cjk adobe-source-han-sans-cn-fonts adobe-source-han-serif-cn-fonts
    

    创建文件.config/fontconfig/fonts.conf,

    mkdir ~/.config/fontconfig/
    vim ~/.config/fontconfig/fonts.conf
    

    加入下面的配置:

    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    
    <fontconfig>
    
        <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
            <its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
        </its:rules>
    
        <description>Manjaro Font Config</description>
    
        <!-- Font directory list -->
        <dir>/usr/share/fonts</dir>
        <dir>/usr/local/share/fonts</dir>
        <dir prefix="xdg">fonts</dir>
        <dir>~/.fonts</dir> <!-- this line will be removed in the future -->
    
        <!-- 自动微调 微调 抗锯齿 内嵌点阵字体 -->
        <match target="font">
            <edit name="autohint"> <bool>false</bool> </edit>
            <edit name="hinting"> <bool>true</bool> </edit>
            <edit name="antialias"> <bool>true</bool> </edit>
            <edit name="embeddedbitmap" mode="assign"> <bool>false</bool> </edit>
        </match>
    
        <!-- 英文默认字体使用 Roboto 和 Noto Serif ,终端使用 DejaVu Sans Mono. -->
        <match>
            <test qual="any" name="family">
                <string>serif</string>
            </test>
            <edit name="family" mode="prepend" binding="strong">
                <string>Noto Serif</string>
            </edit>
        </match>
        <match target="pattern">
            <test qual="any" name="family">
                <string>sans-serif</string>
            </test>
            <edit name="family" mode="prepend" binding="strong">
                <string>Roboto</string>
            </edit>
        </match>
        <match target="pattern">
            <test qual="any" name="family">
                <string>monospace</string>
            </test>
            <edit name="family" mode="prepend" binding="strong">
                <string>DejaVu Sans Mono</string>
            </edit>
        </match>
    
        <!-- 中文默认字体使用思源宋体,不使用 Noto Sans CJK SC 是因为这个字体会在特定情况下显示片假字. -->
        <match>
            <test name="lang" compare="contains">
                <string>zh</string>
            </test>
            <test name="family">
                <string>serif</string>
            </test>
            <edit name="family" mode="prepend">
                <string>Source Han Serif CN</string>
            </edit>
        </match>
        <match>
            <test name="lang" compare="contains">
                <string>zh</string>
            </test>
            <test name="family">
                <string>sans-serif</string>
            </test>
            <edit name="family" mode="prepend">
                <string>Source Han Sans CN</string>
            </edit>
        </match>
        <match>
            <test name="lang" compare="contains">
                <string>zh</string>
            </test>
            <test name="family">
                <string>monospace</string>
            </test>
            <edit name="family" mode="prepend">
                <string>Noto Sans Mono CJK SC</string>
            </edit>
        </match>
    
        <!-- 把Linux没有的中文字体映射到已有字体,这样当这些字体未安装时会有替代字体 -->
        <match target="pattern">
            <test qual="any" name="family">
                <string>SimHei</string>
            </test>
            <edit name="family" mode="assign" binding="same">
                <string>Source Han Sans CN</string>
            </edit>
        </match>
        <match target="pattern">
            <test qual="any" name="family">
                <string>SimSun</string>
            </test>
            <edit name="family" mode="assign" binding="same">
                <string>Source Han Serif CN</string>
            </edit>
        </match>
        <match target="pattern">
            <test qual="any" name="family">
                <string>SimSun-18030</string>
            </test>
            <edit name="family" mode="assign" binding="same">
                <string>Source Han Serif CN</string>
            </edit>
        </match>
    
        <!-- Load local system customization file -->
        <include ignore_missing="yes">conf.d</include>
        <!-- Font cache directory list -->
        <cachedir>/var/cache/fontconfig</cachedir>
        <cachedir prefix="xdg">fontconfig</cachedir>
        <!-- will be removed in the future -->
        <cachedir>~/.fontconfig</cachedir>
    
        <config>
            <!-- Rescan in every 30s when FcFontSetList is called -->
            <rescan> <int>30</int> </rescan>
        </config>
    
    </fontconfig>
    

    office软件及相应字体

    sudo pacman -S wps-office ttf-wps-fonts
    

    中文输入法

    sudo pacman -S fcitx-im fcitx-configtool fcitx-qt4 fcitx-sogoupinyin 
    #  fcitx-im要全部安装 fcitx-configtool:图形化配置工具  fcitx-qt4:解决搜狗输入法问题
    

    编辑~/.xprofile文件,

    vim ~/.xprofile
    

    在文件末尾增加以下内容

    export LC_CTYPE=zh_CN.UTF-8
    export GTK_IM_MODULE=fcitx
    export QT_IM_MODULE=fcitx
    export XMODIFIERS="@im=fcitx"
    

    注销再登录后,就能在右下角(或左上角)看到fcitx图标咯。

    按需安装常用软件

    git

    sudo pacman -S git
    

    安装配置oh my zsh

    sudo pacman -S zsh
    sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" # 下载并配置ohmyzsh
    chsh -s /bin/zsh  #更换默认bash,重启后生效
    

    安装Markdown编辑器typora

    sudo pacman -S typora
    

    新增:

    yay

    Yay 是用 Go 编写的 Arch Linux AUR 包管理工具。AUR 的全称是 Arch User Repository,是 Arch Linux/Manjaro 用户的社区驱动存储库,创建 AUR 的目的是使共享社区包的过程更容易和有条理。使用它可以在 Arch Linux/Manjaro 系统中安装和更新软件包。这个软件仓库的软件包是相当丰富,可以查看这个网站的统计Repository statistics,它的软件列表可以在Archlinux AUR查看。具体可以查看 Arch Wiki

    安装 yay:

    sudo pacman -S yay
    

    配置 yay 的 aur 源为清华源 AUR 镜像:

    yay --aururl "https://aur.tuna.tsinghua.edu.cn" --save
    

    修改的配置文件位于 ~/.config/yay/config.json ,还可通过以下命令查看修改过的配置:

    yay -P -g
    

    yay 安装命令不需要加 sudo,yay 的常用命令:

    yay -S package # 从 AUR 安装软件包
    yay -Rns package # 删除包
    yay -Syu # 升级所有已安装的包
    yay -Ps # 打印系统统计信息
    yay -Qi package # 检查安装的版本
    

    安装常用软件

    # deepin 系的软件
    sudo pacman -S deepin-picker # 深度取色器
    sudo pacman -S deepin-screen-recorder # 录屏软件,可以录制 Gif 或者 MP4 格式
    sudo pacman -S deepin-screenshot # 深度截图
    sudo pacman -S deepin-system-monitor # 系统状态监控
    yay -s deepin-wine-wechat
    yay -S deepin-wine-tim
    yay -S deepin-wine-baidupan
    yay -S deepin.com.thunderspeed
    
    # 开发软件
    sudo pacman -S jdk8-openjdk
    sudo pacman -S make
    sudo pacman -S cmake
    sudo pacman -S clang
    sudo pacman -S nodejs
    sudo pacman -S npm
    sudo pacman -S goland
    sudo pacman -S vim
    sudo pacman -S maven
    sudo pacman -S pycharm-professional # Python IDE
    sudo pacman -S intellij-idea-ultimate-edition # JAVA IDE
    sudo pacman -S goland # Go IDE
    sudo pacman -S visual-studio-code-bin # vscode
    sudo pacman -S qtcreator # 一款QT开发软件
    sudo pacman -S postman-bin
    sudo pacman -S insomnia # REST模拟工具
    sudo pacman -S gitkraken # GIT管理工具
    sudo pacman -S wireshark-qt # 抓包
    sudo pacman -S zeal
    sudo pacman -S gitkraken # Git 管理工具
    
    # 办公软件
    sudo pacman -S google-chrome
    sudo pacman -S foxitreader # pdf 阅读
    sudo pacman -S bookworm # 电子书阅读
    sudo pacman -S unrar unzip p7zip
    sudo pacman -S goldendict # 翻译、取词
    yay -S xmind
    
    # 设计
    sudo pacman -S pencil # 免费开源界面原型图绘制工具
    
    # 娱乐软件
    sudo pacman -S netease-cloud-music
    
    # 下载软件
    sudo pacman -S aria2
    sudo pacman -S filezilla  # FTP/SFTP
    
    # 图形
    sudo pacman -S gimp # 修图
    
    # 系统工具
    sudo pacman -S albert #类似Mac Spotlight,另外一款https://cerebroapp.com/
    yay -S copyq #  剪贴板工具,类似 Windows 上的 Ditto
    sudo pacman -S gufw #安装防火墙  Linux 世界中最简单的防火墙之一
    
    # 终端
    sudo pacman -S screenfetch # 终端打印出你的系统信息,screenfetch -A 'Arch Linux'
    sudo pacman -S htop     #可以在终端中直接管理进程
    sudo pacman -S bat
    sudo pacman -S yakuake # 堪称 KDE 下的终端神器,KDE 已经自带,F12 可以唤醒
    sudo pacman -S net-tools # 这样可以使用 ifconfig 和 netstat
    yay -S tldr
    yay -S tig # 命令行下的 git 历史查看工具
    yay -S tree
    yay -S ncdu # 命令行下的磁盘分析器,支持Vim操作
    yay -S mosh # 一款速度更快的 ssh 工具,网络不稳定时使用有奇效
    

    相关文章

      网友评论

          本文标题:Manjaro Note

          本文链接:https://www.haomeiwen.com/subject/esqtqhtx.html