manjaro 安装后的配置

0、解决网络问题

1、选择国内镜像源加快安装速度
sudo pacman-mirrors -i -c China -m rank

2、添加archlinuxcn的源或多个镜像源,编辑pacman.conf 文件
sudo nano /etc/pacman.conf

然后在末尾添加

[archlinuxcn]
SigLevel = Optional TrustAll
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch

也可以使用多个镜像,防止下载速度慢

sudo pacman -S archlinuxcn-mirrorlist-git

然后,编辑pacman.conf文件,修改archlinuxcn

[archlinuxcn]
Include=/etc/pacman.d/archlinuxcn-mirrorlist

再编辑mirrorlist配置

sudo vim /etc/pacman.d/archlinux-mirrorlist
去掉所有地址前的注释

##
## Arch Linux CN community repository mirrorlist
## Generated on 2019-10-01
##

## 中国科学技术大学 (ipv4, ipv6, http, https)
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch

## 清华大学 (ipv4, ipv6, http, https)
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch

## Our main server (ipv4, ipv6, http, https)
Server = https://repo.archlinuxcn.org/$arch

## xTom (Hong Kong server) (Hong Kong) (ipv4, ipv6, http, https)
Server = https://mirror.xtom.com.hk/archlinuxcn/$arch

## xTom (US server) (US) (ipv4, ipv6, http, https)
Server = https://mirror.xtom.com/archlinuxcn/$arch

## Open Computing Facility, UC Berkeley (Berkeley, CA, United States) (ipv4, ipv6, http, https)
Server = https://mirrors.ocf.berkeley.edu/archlinuxcn/$arch

## 网易 (ipv4, http, https)
Server = https://mirrors.163.com/archlinux-cn/$arch

## xTom (Netherlands server) (Netherlands) (ipv4, http, https)
Server = https://mirror.xtom.nl/archlinuxcn/$arch

## SJTUG 软件源镜像服务 (ipv4, https)
Server = https://mirrors.sjtug.sjtu.edu.cn/archlinux-cn/$arch

## 腾讯云 (ipv4, https)
Server = https://mirrors.cloud.tencent.com/archlinuxcn/$arch

3、安装 archlinuxcn-keyring 包导入GPG key
sudo pacman -Sy archlinuxcn-keyring

如果出现无法锁定database的错误或者等待另一个包管理器退出
执行下面的命令删除db.lck文件即可
sudo rm /var/lib/pacman/db.lck

4、安装中文输入法,搜狗拼音在fcitx-qt4出现冲突,可以选择谷歌拼音、中州韵输入法(繁体字),或系统自带的拼音输入法。

sudo pacman -S fcitx-im  
sudo pacman -S fcitx-configtool
安装好上面两个系统就自带了中文输入法,安装好后还要编辑下面的文件,重启后才能用
新增或编辑 .xprofile文件

sudo nano ~/.xprofile

添加下面的内容到文件中

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

重启机器,Ctrl+空格可以调出输入法,在右下角的面板中右键单击键盘可以设置一下输入法,如调整顺序等。

如果要装谷歌或搜狗输入法则执行下面命令

谷歌输入法
sudo pacman -S  fcitx-googlepinyin

安装中州韵输入法(繁体字),sogou输入法安装不太兼容。试试

sudo pacman -S fcitx-rime

切换为简体中文,使用前需要配置一下,否則沒有這個文件。
sudo  vim  ~/.config/fcitx/rime/build/luna_pinyin.schema.yaml

switches:
  - name: ascii_mode
    reset: 0
    states: ["中文", "西文"]
  - name: full_shape
    states: ["半角", "全角"]
  - name: simplification
#新增下面這一行  
    reset: 1   
    states: ["漢字", "汉字"]
  - name: ascii_punct
    states: ["。,", ".,"]


#####加上    reset:1   这行就成了简体了,也可以每次用F4或者ctrl+`实现切换

 或者创建如下文档:~/.config/fcitx/default.custom.yaml将配置文件usr/share/rime-data中的配置文件default.yaml中需要修改的部分摘出,写到新建文件中去
默认输入法列表    /usr/share/rime-data/default.yaml

个人只留下了简体中文拼音
patch:
                schema_list:
                - schema: luna_pinyin_simp

安装搜狗输入法

sudo pacman -S fcitx-sogoupinyin

搜狗输入法异常!请删除.config/SogouPY 并重启
輸入以下命令
sogou-qimpanel
出現錯誤信息
 sogou-qimpanel:error while loading shared libraries: libfcitx-qt.so.0: cannot open shared object file: No such file or directory
安裝fcitx-qt4,解決上述問題
yay -S fcitx-qt4
Gnome On Wayland 用户无法使用 fcitx
由于 wayland 无法读取 ~/.xprofile 中的环境变量,所以请在/etc/environment中加入:
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx

更新一下系统
sudo pacman -Syu  --noconfirm


5、AUR助手yaourt

Manjaro有自己的图形化包管理器,pamac,当然也可以命令行使用archlinux系的,还有AUR助手 yaourt 更方便。

Yaourt可用于查找软件包(包括[core] [extra] [community] AUR的软件包,pacman只能查找非AUR的软件包)。

sudo pacman -S  --noconfirm yaourt


6、使用yay安装软件
不需要使用root

sudo pacman -S yay

7、安装chrome浏览器
sudo pacman -S  --noconfirm  google-chrome


8、安装wps

sudo pacman -S wps-office
sudo pacman -S ttf-wps-fonts #安装wps缺失的字体


linux wps英文版 如何改为中文版?打开一个文档,点击右上角那个A的标志进行切换。


9、安装网易音乐云
sudo pacman -S netease-cloud-music

10、安装pycharm   clion开发工具
sudo pacman -S pycharm

sudo pacman -S clion

sudo pacman -S anaconda

11、安装vim编辑器,系统提供的vi不好用
sudo pacman -S vim


12、切换终端字体设置
切换为中文后终端的汉字间距很大,可以用系统自带的Inconsolata字体替代,或者下载consolas或者华文细黑替代。

13、安装archlinux 以后没有 ifconfig,route ,nslookup 等命令。

ifconfig,route在net-tools中,
nslookup,dig在dnsutils中,
ftp,telnet等在inetutils中,
ip命令在iproute2中。

sudo pacman -S --noconfirm  net-tools dnsutils inetutils iproute2

例如用route命令添加静态路由,这种方法,重启系统后路由就丢失
#先重启网络
systemctl restart systemd-networkd
#等待5秒
sleep 5s
#添加静态路由
route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.1.2.3

14、下载工具uget,aria2

  sudo  pacman -S uget aria2

 15、安装 zsh
首先是安装 zsh

sudo pacman -S zsh

配置 oh-my-zsh

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

换默认的 shell

chsh -s /bin/zsh

重启使用zsh

查看已有的shell
cat /etc/shells

查看当前shell
echo $SHELL

使用zsh替换bash(重新打开终端生效)
chsh -s /bin/zsh

还原bash(需要重启)
chsh -s /bin/bash

查看zsh版本
zsh --version

 

重启终端   使用 source ~/.zshrc 更新配置

整好之后发现配置的环境变量(mysql)不起作用了,执行source .bash_profile后,

但是终端全部关闭后,就不起作用了。。。。。

----解决方法-----
执行vim ~/.zshr 

将source .bash_profile黏贴到最下面,保存即可

退出终端。再次执行ok了。


第一步:设置官方镜像源
sudo pacman-mirrors -i -c China -m rank #

第二步:更新本地数据包(默认manjaro 是没有同步远程数据包的)

sudo pacman -Syy
sudo pacman -Syu

第三步:下载 vim(manjaro 默认是没有安装 vim 的,如果不想安装的话,可以使用 vi 或自带的 kate)

sudo pacman -S vim

第四步:添加 archlinuxCN源(用 vim 编辑 /etc/pacman.conf --> 命令为:sudo vim /etc/pacman.conf)

在文件底部添加以下几行:
[archlinuxcn]
SigLevel = Optional  TrustAll
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
    
修改文件后,执行下面的命令:

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

添加了 archlinuxcn 的源之后安装 archlinuxcn-keyring 失败
pacman -Syu haveged 
systemctl start haveged 
systemctl enable haveged
rm -rf /etc/pacman.d/gnupg 
pacman-key --init
pacman-key --populate manjaro 
pacman-key --populate archlinuxcn

第五步:安装输入法(安装基于 fcitx 的搜狗输入法,可能会出一点错误)
sudo pacman -S fcitx-im
sudo pacman -S fcitx-configtool
sudo pacman -S fcitx-sogoupinyin

在fcitx-configtool添加搜狗输入法

搜狗输入法异常!请删除.config/SogouPY 并重启

    1

删除了相关文件并且重启还是没有用。
终端中输入

#sogou-qimpanel

 如果出现以下错误安装一下qt4
sogou-qimpanel: error while loading shared libraries: libfcitx-qt.so.0: cannot open shared object file: No such f

sudo pacman -S yaourt  

yaourt -S fcitx-qt4

安装谷歌输入法
sudo pacman -S fcitx-im fcitx-configtool fcitx-googlepinyin

添加输入法配置文件 (sudo vim ~/.xprofile)

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

安装android开发环境
yaourt -S jdk
#设置默认JDK
sudo archlinux-java set java-8-jdk
yaourt -S android-studio
#模拟器
yaourt -S genymotion


#bash的Tab自动补全
 sudo pacman -S bash-completion
 sudo pacman -S vim
 

 

0、解决网络问题

1、选择国内镜像源加快安装速度
sudo pacman-mirrors -i -c China -m rank

2、添加archlinuxcn的源或多个镜像源,编辑pacman.conf 文件
sudo nano /etc/pacman.conf

然后在末尾添加

[archlinuxcn]
SigLevel = Optional TrustAll
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch

也可以使用多个镜像,防止下载速度慢

sudo pacman -S archlinuxcn-mirrorlist-git

然后,编辑pacman.conf文件,修改archlinuxcn

[archlinuxcn]
Include=/etc/pacman.d/archlinuxcn-mirrorlist

再编辑mirrorlist配置

sudo vim /etc/pacman.d/archlinux-mirrorlist
去掉所有地址前的注释

##
## Arch Linux CN community repository mirrorlist
## Generated on 2019-10-01
##

## 中国科学技术大学 (ipv4, ipv6, http, https)
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch

## 清华大学 (ipv4, ipv6, http, https)
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch

## Our main server (ipv4, ipv6, http, https)
Server = https://repo.archlinuxcn.org/$arch

## xTom (Hong Kong server) (Hong Kong) (ipv4, ipv6, http, https)
Server = https://mirror.xtom.com.hk/archlinuxcn/$arch

## xTom (US server) (US) (ipv4, ipv6, http, https)
Server = https://mirror.xtom.com/archlinuxcn/$arch

## Open Computing Facility, UC Berkeley (Berkeley, CA, United States) (ipv4, ipv6, http, https)
Server = https://mirrors.ocf.berkeley.edu/archlinuxcn/$arch

## 网易 (ipv4, http, https)
Server = https://mirrors.163.com/archlinux-cn/$arch

## xTom (Netherlands server) (Netherlands) (ipv4, http, https)
Server = https://mirror.xtom.nl/archlinuxcn/$arch

## SJTUG 软件源镜像服务 (ipv4, https)
Server = https://mirrors.sjtug.sjtu.edu.cn/archlinux-cn/$arch

## 腾讯云 (ipv4, https)
Server = https://mirrors.cloud.tencent.com/archlinuxcn/$arch

3、安装 archlinuxcn-keyring 包导入GPG key
sudo pacman -Sy archlinuxcn-keyring

如果出现无法锁定database的错误或者等待另一个包管理器退出
执行下面的命令删除db.lck文件即可
sudo rm /var/lib/pacman/db.lck

4、安装中文输入法,搜狗拼音在fcitx-qt4出现冲突,可以选择谷歌拼音、中州韵输入法(繁体字),或系统自带的拼音输入法。

sudo pacman -S fcitx-im  
sudo pacman -S fcitx-configtool
安装好上面两个系统就自带了中文输入法,安装好后还要编辑下面的文件,重启后才能用
新增或编辑 .xprofile文件

sudo nano ~/.xprofile

添加下面的内容到文件中

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

重启机器,Ctrl+空格可以调出输入法,在右下角的面板中右键单击键盘可以设置一下输入法,如调整顺序等。

如果要装谷歌或搜狗输入法则执行下面命令

谷歌输入法
sudo pacman -S  fcitx-googlepinyin

安装中州韵输入法(繁体字),sogou输入法安装不太兼容。试试

sudo pacman -S fcitx-rime

切换为简体中文
sudo  vim  /.config/fcitx/rime/build/luna_pinyin.schema.yaml

switches:
  - name: ascii_mode
    reset: 0
    states: ["中文", "西文"]
  - name: full_shape
    states: ["半角", "全角"]
  - name: simplification
    reset: 1   
    states: ["漢字", "汉字"]
  - name: ascii_punct
    states: ["。,", ".,"]


#####加上    reset:1   这行就成了简体了,也可以每次用F4或者ctrl+`实现切换
 

 或者创建如下文档:~/.config/fcitx/default.custom.yaml将配置文件usr/share/rime-data中的配置文件default.yaml中需要修改的部分摘出,写到新建文件中去
默认输入法列表usr/share/rime-data/default.yaml

个人只留下了简体中文拼音
patch:
                schema_list:
                - schema: luna_pinyin_simp

安装搜狗输入法

sudo pacman -S fcitx-sogoupinyin

搜狗输入法异常!请删除.config/SogouPY 并重启
輸入以下命令
sogou-qimpanel
出現錯誤信息
 sogou-qimpanel:error while loading shared libraries: libfcitx-qt.so.0: cannot open shared object file: No such file or directory
安裝fcitx-qt4,解決上述問題
yay -S fcitx-qt4
Gnome On Wayland 用户无法使用 fcitx
由于 wayland 无法读取 ~/.xprofile 中的环境变量,所以请在/etc/environment中加入:
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx

更新一下系统
sudo pacman -Syu 


5、AUR助手yaourt

Manjaro有自己的图形化包管理器,pamac,当然也可以命令行使用archlinux系的,还有AUR助手 yaourt 更方便。

Yaourt可用于查找软件包(包括[core] [extra] [community] AUR的软件包,pacman只能查找非AUR的软件包)。

sudo pacman -S--noconfirm yaourt


6、使用yay安装软件
不需要使用root

sudo pacman -S yay

7、安装chrome浏览器
sudo pacman -S google-chrome


8、安装wps

sudo pacman -S wps-office
sudo pacman -S ttf-wps-fonts #安装wps缺失的字体


linux wps英文版 如何改为中文版?打开一个文档,点击右上角那个A的标志进行切换。


9、安装网易音乐云
sudo pacman -S netease-cloud-music

10、安装pycharm开发工具
sudo pacman -S pycharm

11、安装vim编辑器,系统提供的vi不好用
sudo pacman -S vim


12、切换终端字体设置
切换为中文后终端的汉字间距很大,可以用系统自带的Inconsolata字体替代,或者下载consolas或者华文细黑替代。

13、安装archlinux 以后没有 ifconfig,route ,nslookup 等命令。

ifconfig,route在net-tools中,
nslookup,dig在dnsutils中,
ftp,telnet等在inetutils中,
ip命令在iproute2中。

sudo pacman -S net-tools dnsutils inetutils iproute2

例如用route命令添加静态路由,这种方法,重启系统后路由就丢失
#先重启网络
systemctl restart systemd-networkd
#等待5秒
sleep 5s
#添加静态路由
route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.43.18.1

14、下载工具uget,aria2

  sudo  pacman -S uget aria2 

 15、安装 zsh
首先是安装 zsh

sudo pacman -S zsh

配置 oh-my-zsh

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

换默认的 shell

chsh -s /bin/zsh

重启使用zsh

查看已有的shell
cat /etc/shells

查看当前shell
echo $SHELL

使用zsh替换bash(重新打开终端生效)
chsh -s /bin/zsh

还原bash(需要重启)
chsh -s /bin/bash

查看zsh版本
zsh --version


16、安装JDK

17


18  \filezilla
sudo pacman -S filezilla

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值