伟大伟大

ArchLinux command

Archlinux Mirror

vim etc/pacman.d/mirrorlist

add one line at the top of the file mirrorlist:

Server = http://mirrors.163.com/archlinux/$repo/os/x86_64

Archlinux-cn Mirror

vim /etc/pacman.conf

add follow lines:

[archlinuxcn]
SigLevel = Optional TrustedOnly
Server = http://mirrors.163.com/archlinux-cn/$arch

then
execute pacman -S archlinuxcn-keyring to import GPG key

AUR

git clone xxx
makepkg -si
# install manually: pacman -U xxx.pkg.tar.xz

Clash

https://github.com/Dreamacro/clash/releases

http://yacd.haishan.me
http://clash.razord.top
开机自启动脚本:

vim /etc/profile.d/clash.sh
#!/usr/bin/bash
/opt/clash/clash.bin -d /root/.config/clash/ &

Desktop Entry

/usr/share/applications/
~/.local/share/applications/

Desktop file Example:

cat /usr/share/applications/jetbrains-idea.desktop 
[Desktop Entry]
Version=1.0
Type=Application
Name=IntelliJ IDEA Ultimate Edition
Icon=/opt/idea-IU-193.5662.53/bin/idea.svg
Exec="/opt/idea-IU-193.5662.53/bin/idea.sh" %f
Comment=Capable and Ergonomic IDE for JVM
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-idea

Querying package databases

Pacman can search for packages in the database, searching both in packages' names and descriptions:

$ pacman -Ss string1 string2 ...

To search for already installed packages:

$ pacman -Qs string1 string2 ...

To display extensive information about a given package:

$ pacman -Si package_name

For locally installed packages:

$ pacman -Qi package_name

To retrieve a list of the files installed by a package:

$ pacman -Ql package_name

(*)To retrieve a list of the files installed by a remote package:

$ pacman -Fl package_name

Example:

pacman -Fl maven
maven etc/
maven etc/profile.d/
maven etc/profile.d/maven.sh
maven opt/
maven opt/maven/
maven opt/maven/LICENSE
maven opt/maven/NOTICE
maven opt/maven/README.txt
maven opt/maven/bin/
maven opt/maven/bin/m2.conf
maven opt/maven/bin/mvn
maven opt/maven/bin/mvn.cmd


To verify the presence of the files installed by a package:

$ pacman -Qk package_name

Example:

pacman -Qk jdk8-openjdk

jdk8-openjdk: 136 total files, 0 missing files

To query the database to know which package a file in the file system belongs to:

$ pacman -Qo /path/to/file_name

Example:

pacman -Qo /usr/bin/java

/usr/bin/java is owned by java-runtime-common 3-1

(*)To query the database to know which remote package a file belongs to:

$ pacman -F file_name #not locally required, so can only file name is given

Note:Search for a package that contains a specific file must firstly
sync the files database:pacman -Fy

To list all packages no longer required as dependencies (orphans):

$ pacman -Qdt

Removing packages

To remove a single package, leaving all of its dependencies installed:

# pacman -R package_name
To remove a package and its dependencies which are not required by any other installed package:

# pacman -Rs package_name
To remove a package, its dependencies and all the packages that depend on the target package:

Warning: This operation is recursive, and must be used with care since it can remove many potentially needed packages.
# pacman -Rsc package_name
To remove a package, which is required by another package, without removing the dependent package:

Warning: The following operation can break a system and should be avoided. See System maintenance#Avoid certain pacman commands.
# pacman -Rdd package_name
Pacman saves important configuration files when removing certain applications and names them with the extension: .pacsave. To prevent the creation of these backup files use the -n option:

# pacman -Rn package_name
Note: Pacman will not remove configurations that the application itself creates (for example "dotfiles" in the home folder).

## bluetooth
module-bluetooth-discover works only if started 'later' (whatever that means)
I commented out
Quote:
load-module module-bluetooth-discover
in /etc/pulse/default.pa, started it from the command line
Code:
 pactl load-module module-bluetooth-discover
grrrr... I know how much you-all have been waiting for this.

I took this tip from a thread that said that it had to be started after X had started- the first tip that worked for me. I discovered this wasn't true. I guessed that the problem was pulse starting before bluetooth, but it doesn't (at least not on my system). I'm fresh out of guesses.
posted @ 2021-02-26 23:40  wooHsi  阅读(95)  评论(0)    收藏  举报