装完manjaro炒作系统后你需要做的几点优化


实验环境:

第一步提高下载和数据库连接速度:

    评估你自己的镜像源下载速度:

[mrrobot@mrrobot-pc ~]$  sudo pacman-mirrors --fasttrack 5 && sudo pacman -Syyu
.: INFO Writing mirror list
   China           : https://mirrors.shu.edu.cn/manjaro/stable
   Japan           : http://ftp.tsukuba.wide.ad.jp/Linux/manjaro/stable
   United_States   : https://mirror.clarkson.edu/manjaro/stable
   Germany         : https://mirror.philpot.de/manjaro/stable
   Spain           : http://ftp.caliu.cat/manjaro/stable
.: INFO Mirror list generated and saved to: /etc/pacman.d/mirrorlist


第二部开始同步数据库下

    执行更新命令:

sudo pacman -Syyu

或者也可以这样做(可以省去第一步):

pacman-optimize && sync

第三步同步更新:

pacman -Sy

    或者是强制更新,这在你改变完一系列依赖后特别有用:

pacman -Syy

第三步开始更新系统:

pacman -Su #不建议使用这会导致局部更新
pacman -Syu #建议这样做,因为这样会先同步数据再更新

懒癌发作:::::::

Update & ignore a package It should not be necessary to use exclusion of packages. Such an exclusion might be the cause of the infamous partial updates.

  • The following changes take place in pacman's configuration file: /etc/pacman.conf
IgnorePkg=package_name

Update & ignore a package group

IgnoreGroup=package_group
  • Examples:
IgnoreGroup=gnome
IgnoreGroup=kde

Installing Packages

Install a package

pacman -Syu package_name
  • If for example you are using the testing repo, & you have that repo listed below your other repos in /etc/pacman.conf which should mean that an older package will take priority over the younger one in the testing repo, you should use pacman like this:
pacman -Syu testing/package_name


Install packages as a group

pacman -Syu gnome
pacman -Syu kde

Download a package without installation

pacman -Sw package_name

Install a downloaded or a local package

pacman -U /package_path/package_name.pkg.tar.xz
  • You can also use the URL:
pacman -U http://www.examplepackage/repo/examplepkg.tar.xz

Reinstall all packages

pacman -Syu $(pacman -Qqen)

To search which packages has been installed in a group

pacman -Sg gnome
pacman -Sg kde

Get a full package list with versions. This will create a file called pacman.laptop in your home folder.

pacman -Q > ~/pacman.laptop

Removing Packages

Remove a package

pacman -R package_name

Remove a package with dependencies that are not being used by other packages

pacman -Rs package_name

Remove a package with all dependencies. Attention: The -c flag can remove needed dependencies, too. Only for advanced users.

pacman -Rsc package_name
  • Remove a package and its configuration files too:
pacman -Rn package_name

Forcefully remove a dependency without removing any other package. Attention: Only for advanced users.

pacman -Rdd package_name


Cleaning Packages

See Maintaining /var/cache/pacman/pkg for System Safety for an in depth view on this topic.

Cleaning the cache

  • Leaves packages in your cache only for those packages which are currently installed on your system. Attention: This eliminates the possibility to Using Downgrade.
pacman -Sc
  • Clean cache completely and remove all packages. Attention: This eliminates the possibility to Using Downgrade.
pacman -Scc
  • A safer way to remove old package cache files is to remove all packages except for the latest three package versions:
paccache -rvk3


Cleaning orphan packages from the system. Also read Orphan Package Removal for further information.

pacman -Rsn $(pacman -Qdtq)

If you get this error, don't worry: it means you don't have orphaned packages to remove!

error: no targets specified (use -h for help)

Searching for Packages

Provides a description of searched for package & associated packages

pacman -Ss package_name

Provides a description of previously installed package

pacman -Qs package_name

Provides detailed summary of a package

pacman -Si package_name
  • Modified summary:
pacman -Qi package_name
  • with 'ii' you can see the backup files and the date that the package has been changed.
pacman -Qii package_name

Get a list of installed packages

pacman -Q

Find out which package owns a file

pacman -Qo /file_path

List all orphan packages with no dependencies

pacman -Qdt

List all installed packages from the AUR

pacman -Qem

View package dependencies. Use one of the following commands:

pactree package_name
pactree -c package_name
pactree -s -c package_name


AUR (Arch User Repository)

Following is info on three popular options for using the AUR, for a detailed list of their commands please look at their man pages:


Yaourt

Yaourt comes pre-installed with Manjaro so you normally won't have to install it. If you have removed it, this is how you install it again:

pacman -Syu base-devel yaourt
  • To use Yaourt to upgrade both official repos & AUR (only if new PKGBUILD files are available) use the following command:
yaourt -Syua
  • To use Yaourt to download and rebuild the latest AUR packages from their source (regardless of PKGBUILD files):
yaourt -Syua --devel


You can use all Pacman commands mentioned on this Wiki page with Yaourt, too. One command is different:

  • Removing orphaned packages is easier and more intuitive with Yaourt:
yaourt -Qdt


Packer

  • Uses some of the same commands as pacman but differs in that it checks both the official repos & AUR.
yaourt -S packer
  • Having installed 'packer' then you can run:
packer -S package_name
  • This will upgrade from both official repos & AUR:
packer -Syu



        

            

Manjaro 是一款基于 Arch Linux 的操作系统,它以其简洁、易用和稳定的特性而受到广大用户的喜爱。在安装 Manjaro 时,我们可以选择将其与其他操作系统一起安装在同一台计算机上,这就是双系统安装。 双系统安装意味着在一台计算机上同时拥有两个不同的操作系统。在安装 Manjaro 双系统时,我们需要为其分配一定的磁盘空间。首先,我们需要备份和压缩原有的操作系统并为其腾出足够的磁盘空间。然后,我们可以通过引导装载程序(如 GRUB)来选择启动哪个操作系统。 安装 Manjaro 双系统的好处之一是可以在不同的操作系统之间切换。例如,当一些软件在 Manjaro 上不可用时,我们可以切换回原来的操作系统来满足我们的需求。此外,双系统安装还可以提供更好的兼容性,使我们能够使用多个操作系统来运行不同的软件和游戏。 然而,双系统安装也存在一些挑战。首先,我们需要管理不同的系统更新和软件安装。其次,双系统可能会占用更多的磁盘空间,因此我们需要确保计算机有足够的可用空间。此外,始终保持双系统的稳定性和安全性也是一个重要的考虑因素。我们需要定期更新操作系统和软件,并确保安装了适当的防病毒软件来保护计算机的安全。 总结来说,Manjaro 双系统安装允许我们在一台计算机上同时拥有两个操作系统。它提供了更多的选择,但也需要我们管理更新和保持系统稳定和安全。通过充分了解和规划,我们可以成功安装和使用 Manjaro 双系统
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值