manjaro 的配置
一、更新源的配置:
1)、自动方法:
在 终端 执行下面的命令从官方的源列表中对中国源进行测速和设置
sudo pacman-mirrors -c China
2)、手动方法
自动方法(上面的方法1,自动测速)的源ping虽然低但是更新时不是很稳定,下载速度忽高忽低,所以也可以用下面的方法手动指定想要使用的源。
创建一个名为 /etc/pacman.d/mirrors/Custom
的文件,并在里面加入:
##
## Pacman Mirrorlist
## [Custom]
Server = http://mirrors.tuna.tsinghua.edu.cn/manjaro/stable/$repo/$arch
Server = https://mirrors.ustc.edu.cn/manjaro/stable/$repo/$arch
# 目前中国有四个源我去除了两个实际速度不加的,查看官方的源列表 http://repo.manjaro.org/
# 可以加入其它的软件源,格式与这个类似。
保存后接着编辑 /etc/pacman-mirrors.conf
,使 pacman-mirrors 只对这个文件列出的镜像站进行排行:
OnlyCountry = Custom
如果需要关闭测速则进一步修改
Method=random
保存后终端执行
sudo pacman-mirrors -g
二、额外增加Arch Linux CN源
Manjaro是基于Arch的,而AUR是Arch社区用户维护的软件包(也是arch可用软件量巨大的所在),我们等下要安装的搜狗拼音、chrome等不少软件都在这里维护。不过网慢啊~!所以我们可以为Manjaro增加这个中文社区的源来方便我们安装一下软件。
在 /etc/pacman.conf
文件末尾添加行:
[archlinuxcn]
SigLevel = Optional TrustedOnly
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
然后安装 archlinuxcn-keyring 包以导入 GPG key,否则的话key验证失败会无法安装的。
下面是网上抄来的添加中科大源的方法:
#先排列源
sudo pacman-mirrors -g
#同步并优化(类似磁盘整理,固态硬盘无需操作)
sudo pacman-optimize && sync
#升级系统 (根据自己需要决定运行否)
sudo pacman -Syyu
添加中科大源
#打开配置文件
sudo nano /etc/pacman.conf
在文件末尾添加
[archlinuxcn]
SigLevel = Optional TrustedOnly
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
#导入GPG Key
sudo pacman -Syy && sudo pacman -S archlinuxcn-keyring
现在可以安装软件了,比如 chrome 和搜狗拼音输入法
#安装chrome
sudo pacman -S google-chrome
添加了中科大源后,也可以直接在添加/删除软件里搜索直接安装
安装搜狗拼音输入法
sudo pacman -S fcitx-im #默认全部安装
sudo pacman -S fcitx-configtool
sudo pacman -S fcitx-sogoupinyin
#添加输入法配置文件
sudo pacman nano ~/.xprofile
添加以下内容
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
archlinux 的自启动:
1,一般情况下新建一个 ~/.xprofile
文件然后在里面加入命令就可以了。注意该文件是由 GDM/KDM/startx 等呼叫起来的,里面的命令执行完毕之后控制权会交回给 GDM/KDM/startx。
2,.xinitrc/.xsession 就比较特殊了,虽然也可以在里面放置需要启动时执行的命令,且也是由 由 GDM/KDM/startx 等呼叫起来的,但是这些命令执行之后控制权无法回到 GDM/KDM/startx。因此你需要在这些文件的末尾放置: exec $(get_session) 或 exec gnome-session
或 exec startkde
或 exec enlightenment
或 exec icewm
之类的。
3,所有linux发行版的自启动文件测试:
把这三个文件 (如果有的话) 先备份起来, 然后建立一个测试用的 .xprofile, 里面放一句:
(echo -n "$0 is called at " ; date) >> ~/startup.log
这句话是打印出自己的名字(即$0)及被执行的时间,并写入到log文件里。注意有些系统需要文件的可执行属性,记得修改下,即 chmod u+x .profile。 然后重启或注销再登录,检查 ~/startup.log的内容。然后把 .xprofile 改名为 .xinitrc,记得在最后加上一句 exec $(get_session) ,再次重启、再登录,检查 startup.log。最后把 .xinitrc 改成 .xsession, 重启、登录,检查 startup.log。 警告,.xinitrc 及 .xsession 必须加上 exec $(get_session),如果忘记加或者加错了,则无法进入桌面视窗,会立即退回到登录界面。 这是需要按 ctrl-alt-f6 切换到文字模式,然后删除 .xinitrc / .xsession 或者把他们的最后那句写对,就可以继续登录桌面视窗了。 这中方法可以对所有linux发行版的自启动文件进行测试,看哪个文件可以加入自启动命令。
manjaro 安装 virtualbox 的方法:
1, 因为 virtualbox 有模块要安装到内核里面,你需要知道你当前的内核版本:
uname -r
,比如输出了v4.14.20-2-MANJAROv
那么你的内核版本为414。
2, 然后运行:
sudo pacman -S virtualbox
安装完成后重启 virtualbox 或者 直接重启机器,以下命令是重启 virtualbox:
sudo vboxreload
3, 安装扩展包,以下命令可以查看或者安装扩展包的名字:
sudo pacman -Ss virtualbox-ext-oracle
如果以上命令没有安装,你可以去官网下载对应的扩展包。然后安装如下过程安装:
3.1, 以sudo 方式运行 virtualbox, 从菜单选择 File -> Preference, 选择 Extension tab, 然后 点击 Add Package, 安装刚才下载的扩展包。
4, 将当前登录用户加入 vboxusers 组:
sudo gpasswd -a $USER vboxusers
5, 如果你使用了多个内核, (使用单内核的请忽略这一步):
5.1, 如果安装virtualbox时是单内核,即多内核是在安装 virtualbox 之后才加入的,那么没必要再重新安装 vritualbox 及其扩展包了,因为 manjaro 会自动探测到已安装的模块,然后在新的内核中自动添加。
5.2, 如果你安装 virtualbox 之前就已经是多内核了,则:
5.2.1. Select the appropriate kernel at the bootup screen
5.2.2. Download the VirtualBox Host Utilities for that particular kernel, as this provides the necessary vboxdrv VirtualBox module to add. The syntax of the command to do so is:
sudo pacman -S [kernel version]-virtualbox-host-modules
When listing the kernel version currently being used in the command, it is not necessary to write the entire version number. Any version of Kernel 3.5 can be listed simply as 'linux35', and any version of Kernel 3.6 can be listed as 'linux36', and so on. As an example, the following command will install the VirtualBox Host Utilities specifically for kernel version 3.5:
sudo pacman -S linux35-virtualbox-host-modules
5.2.3. Once the VirtualBox Host Utilities have been downloaded, enter the following command to add the VirtualBox module to the kernel:
sudo modprobe vboxdrv
VirtualBox 安装 ArchLinux 的 guest 增强功能的方法:
网上说 manjaro 会自动安装上 virtualbox 的 guest 增强功能,请自行检查,如果没有安装上,请以如下方式安装:
当用VirtualBox安装ArchLinux时(即ArchLinux作为guest),启用增强功能的方式与其他Linux有所区别,在ArchLinux需要不必采用附加镜像安装增强功能的方式,而是直接安装官方仓库中的virtualbox-guest-modules包即可,如过需要增强功能随着内核升级而动态更新则需要安装dkms服务,执行以下命令完成增强功能的安装:
# pacman -S virtualbox-guest-modules virtualbox-guest-dkms
当增强功能安装完成后,需要启动对应的内核模块:
# modprobe -a vboxguest vboxsf vboxvideo
之后还需要运行VirtualBox客户端脚本确保相关特性全部开启:
# VBoxClient-all
如果经常使用增强功能,则可以开启服务:
# systemctl enable vboxservice
然后就可以尝试挂载你的分区了:
# mount -t vboxsf [你的共享文件夹的名字] [需要挂载到的位置]
archlinux 启动 sshd
首先检查是否安装了它,直接在命令行敲 sshd 看看有没有这个命令,没有则安装它:
sudo pacman -S openssh
然后运行:
ystemctl start sshd.service
则可以将sshd运行起来。
manjaro 禁止开机启动 bluetooth:
systemctl list-unit-files --type=service | grep enabled # lists of enabled services
sudo systemctl stop bluetooth.service # stops the service
sudo systemctl disable bluetooth.service # disables service from loading at boot
systemctl status bluetooth.service # verify that service got disabled
sudo systemctl mask bluetooth.service # if you
really want it dead (so other services can’t start it again)
systemctl list-unit-files --type=service #
lists of ALL services (some STATIC are dependancies of other services
and can’t be disabled)
备注:有些进程/服务,如果你不将它们进行mask,即使被disable了,也有可能被其它进程再次启动起来。
manjaro 设置 fcitx 输入法:
1、设置它只有在使用额外切换键隐藏输入法后,才可以再使用额外切换键将其唤醒:
直接运行 fcitx-configtool 即可进行图形界面配置。
然后查看 .config/fcitx/config 里的相应值是否已经改变,然后立即手动将 .config/fcitx/config 和 .config/fcitx/profile 的所有写属性去掉,即 chmod a-w .config/fcitx/config; chmod a-w .config/fcitx/profile;
打开配置文件 .config/fcitx/config,
将 UseExtraTriggerKeyOnlyWhenUseItToInactivate=False 改成 UseExtraTriggerKeyOnlyWhenUseItToInactivate=True
将 SwitchKey=SHIFT Both 注释掉
将 IMSwitchIncludeInactive=True 改为 False
即可。
manjaro 的配置的更多相关文章
- Manjaro安装配置笔记
简单介绍: Manjaro和Ubuntu的都使用有段时间了,还是AUR大法用着舒服趁着由KDE桌面更换deepin时系统崩溃,直接重装了系统,版本:Manjaro-deepin-17.1.7-x86_ ...
- Manjaro 初始配置----anaconda-pycharm-opencv-tensorflow
1.安装蟒蛇 1)安装 yaourt anaconda source /opt/anaconda/bin/active root 2)添加环境变量 在〜/ .bashrc中添加 export PATH ...
- manjaro i3 配置笔记
更改国内源 sudo pacman-mirrors -GB testing -c China 增加Arch linuxcn源 在/etc/pacman.conf文件末尾添加两行: [archlinux ...
- Manjaro安装配置美化字体模糊发虚解决记录
Manjaro安装记录 前言: 记录自己Manjaro18安装的一些坑,避免下次满互联网找解决方法.在此之前试过Manjaro.Ubuntu.Fedora.linux Mint系统的pac.yum ...
- Manjaro美化 配置教程
Manjaro Linux的美化 切换源 sudo vi /etc/pacman.conf 加入arch源 [archlinuxcn] SigLevel = Optional TrustedOnly ...
- Manjaro Linux 配置nfs服务器
NFS客户端和NFS服务端通讯过程 1.首先服务器端启动RPC服务,并开启111端口 2.服务器端启动NFS服务,并向RPC注册端口信息 3.客户端启动RPC(portmap服务),向服务端的RPC请 ...
- 学习环境配置:Manjaro、MSYS2以及常见软件
0.前言 在说Manjaro之前,要先说一下Linux发行版.对于各大发行版而言,内核只有版本的差异,最重要的区别就是包管理系统.常见的包管理系统包括:Pacman,Apt , Yum和Portage ...
- dell 7559 安装Manjaro 18
本来是装黑苹果的,折腾好几天都装好了,是可以正常使用的,可是clover始终有一个问题,每次启动前需要覆盖一遍EFI分区内EFI目录的CLOVER目录内的所有文件,方能引导MAC. 不然就卡Init ...
- win10双系统安装 linux(manjaro)记录
.clearFloat::after { content: ""; height: 0; display: block; clear: both; visibility: hidd ...
随机推荐
- SharePoint 错误集 2
1 Run command “New-SPConfigurationDatabase" Feature Description: error message popup after run ...
- Windows Server 2008配置Network Load Balancing(服务群集)
最近配置SharePoint 2013 WFE 时,客户提到要让多台WFE能load balance,于是研究了下Network Load Balancing. 当把一台服务器 ...
- 洛谷 P2059 [JLOI2013]卡牌游戏 解题报告
P2059 [JLOI2013]卡牌游戏 题意 有\(n\)个人玩约瑟夫游戏,有\(m\)张卡,每张卡上有一个正整数,每次庄家有放回的抽一张卡,干掉从庄家起顺时针的第\(k\)个人(计算庄家),干掉的 ...
- 监控(3)进程通用shell
#! /bin/bash proc_name="beam.smp" #进程名 proc_num() #查询进程数{ num=`ps -ef | grep $proc_name | ...
- javascript面向对象精要第三章对象整理精要
什么是对象的数据属性?什么是对象的访问器属性?[put]方法是默认创建数据属性的,访 问器属性不包含值而是定义了一个单属性被读取时调用的函数(getter)和当一个属性被写入时 调用的函数(sette ...
- 第一节,TensorFlow基本用法
一 TensorFlow安装 TensorFlow是谷歌基于DistBelief进行研发的第二代人工智能学习系统,其命名来源于本身的运行原理.Tsnsor(张量)意味着N维数组,Flow(流)意味着基 ...
- 高效的SQLSERVER分页查询
Sqlserver数据库分页查询一直是Sqlserver的短板,闲来无事,想出几种方法,假设有表ARTICLE,字段ID.YEAR...(其他省略),数据53210条(客户真实数据,量不大),分页查询 ...
- java连接数据库读取数据出现乱码
因为这是通用编码,像中国通常使用的GBK.GB2312.Big5等只是针对中文而言,但是对其他文字就不适用了,为了使得这个问题的解决具有文字编码通用性,所以我这里设定了UTF8这个编码. 编码一致性涉 ...
- 关于TCP连接状态的解释
TCP各个状态主要存在于三次握手和四次挥手的过程 1.TCP建立连接时的三次握手: 服务端应用监听端口处于LISTEN状态,等待建立连接. 第一次握手:客户端发送SYN=一个随机数,然后进入SYN_S ...
- curl模拟http发送get或post接口测试
一.get请求 curl "http://www.baidu.com" 如果这里的URL指向的是一个文件或者一幅图都可以直接下载到本地 curl -i "http:// ...