Arch Linux tips 'n tricks

Every day solutions to every day challenges. + Brilliant stuff

Moderators: b1o, jkerr82508

Forum rules
Please feel free to post your tip it does not have to be advanced. Also ask questions directly related to the tip here. But do not start new threads with questions or ask for help here. That is what the help section is for. forum rules: http://bjoernvold.com/forum/viewtopic.php?f=8&t=568
User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

Re: Arch Linux tips 'n tricks

Postby dedanna1029 » 02 Apr 2011, 19:45

Ah, okay, thanks. We must've been in GMTA mode, at the same time. That's what I did, too.
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Arch Linux tips 'n tricks

Postby viking60 » 12 May 2011, 22:09

Ok I need to write this down:
To get a list over everything that is installed on your arch system type the following command in a terminal:

Code: Select all

pacman -Qqe | grep -vx "$(pacman -Qqm)" > /path/to/chosen/directory/pkg.list

And when lightening strikes you can restore all of them like this;

Code: Select all

xargs -a /path/to/chosen/directory/pkg.list pacman -S --needed
.
Making it a cron job that runs just before the backup cron with our excellent backup script, gives you the home directory and the programs from the same time.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Arch Linux tips 'n tricks

Postby viking60 » 09 Jun 2011, 20:43

Here is an easy one.
To control your Daemons in Arch:

Code: Select all

rc.d list

[STOPPED][ ] 915resolution
[STOPPED][ ] autofs
[STARTED][ ] avahi-daemon
[STOPPED][ ] avahi-dnsconfd
[STOPPED][ ] bluetooth
[STOPPED][ ] brltty
[STOPPED][ ] cpufreq
[STARTED][AUTO] crond
[STARTED][AUTO] cups
[STARTED][AUTO] dbus
[STOPPED][ ] deluge-web
[STOPPED][ ] deluged
[STOPPED][ ] derby-network-server
[STOPPED][ ] esd
[STOPPED][ ] fancontrol
[STOPPED][ ] fbcondecor
[STOPPED][ ] fluidsynth
[STOPPED][ ] ftpd
[STOPPED][ ] gdm
[STOPPED][ ] gpm
[STOPPED][ ] healthd
[STARTED][AUTO] httpd
[STARTED][AUTO] hwclock
[STOPPED][ ] ip6tables
[STOPPED][ ] iptables
[STOPPED][ ] irexecd
[STOPPED][ ] kadmind.rc
[STOPPED][ ] kdm
[STOPPED][ ] krb5-kdc.rc
[STOPPED][ ] libvirtd
[STOPPED][ ] lircd
[STOPPED][ ] lircmd
[STOPPED][ ] mdadm
[STOPPED][ ] mono
[STARTED][AUTO] mysqld
[STOPPED][ ] net-auto-wired
[STOPPED][ ] net-auto-wireless
[STOPPED][ ] net-profiles
[STOPPED][ ] net-rename
[STARTED][AUTO] netfs
[STOPPED][ ] network
[STARTED][AUTO] networkmanager
[STOPPED][ ] nfs-common
[STOPPED][ ] nfs-server
[STOPPED][ ] nscd
[STARTED][AUTO] polipo
[STOPPED][ ] ppp
[STOPPED][ ] proftpd
[STOPPED][ ] ptal-init
[STOPPED][ ] rpcbind
[STOPPED][ ] rsyncd
[STARTED][AUTO] samba
[STOPPED][ ] sensord
[STOPPED][ ] sensors
[STOPPED][ ] slim
[STOPPED][ ] slpd
[STARTED][AUTO] smbnetfs
[STOPPED][ ] snmpd
[STARTED][AUTO] sshd
[STARTED][AUTO] syslog-ng
[STARTED][AUTO] tor
[STOPPED][ ] vboxdrv
[STOPPED][ ] vboxtool
[STOPPED][ ] xinetd


To start specific daemons:

Code: Select all

rc.d start samba tor sshd
etc etc
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Removing groups of software by name-content

Postby viking60 » 02 Oct 2011, 15:32

I needed to remove anything containing gnome-shell on my laptop. If I do only

Code: Select all

sudo pacman -Rns gnome-shell
It will refuse to remove because of another package dependency and that package has dependencies again etc etc.

When I do a

Code: Select all

ls gnome-shell*
It lists packages starting with gnome shell but the * will not work in pacman.
This will do it though:

Code: Select all

sudo pacman -Rns $(pacman -Qq | grep gnome-shell)

This queries the database for anything containing "gnome-shell" (in this case) and removes it.

I always forget so I needed to write this down too :-D

More here
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

Re: Arch Linux tips 'n tricks

Postby dedanna1029 » 03 Oct 2011, 21:13

viking60 wrote:Here is an easy one.

To start specific daemons:

Code: Select all

rc.d samba tor sshd
etc etc

OMG I love this one. :love
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Arch Linux tips 'n tricks

Postby viking60 » 03 Oct 2011, 21:46

Yes I constantly encourage people to write down some tips - How simple they might bee. The modesty and "everybody knows it" attitude is bad. I don't know everything that you might find to be elementary. So don't wait for the help cry Gurus!
I don't even know how to ask :confused
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Arch Linux tips 'n tricks

Postby viking60 » 08 Dec 2011, 12:05

To list all installations from AUR only:

Code: Select all

pacman -Qm
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

Re: Arch Linux tips 'n tricks

Postby dedanna1029 » 09 Dec 2011, 02:55

viking60 wrote:To list all installations from AUR only:

Code: Select all

pacman -Qm

Thank you!
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
dedanna1029
Sound-Berserk
Posts: 8780
Joined: 14 Mar 2010, 20:29
Contact:

Re: Arch Linux tips 'n tricks

Postby dedanna1029 » 09 Dec 2011, 02:56

viking60 wrote:To get a list over everything that is installed on your arch system type the following command in a terminal:

Code: Select all

pacman -Qqe | grep -vx "$(pacman -Qqm)" > /path/to/chosen/directory/pkg.list

And when lightening strikes you can restore all of them like this;

Code: Select all

xargs -a /path/to/chosen/directory/pkg.list pacman -S --needed
.

Also, thank you! The wiki has the first command wrong! I've been trying this for ages their way, to no avail!!!
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Arch Linux tips 'n tricks

Postby viking60 » 15 Feb 2012, 15:29

To install with wildcard:

Code: Select all

pacman -S $(pacman -Ssq gnome-shell*)

This will install everything starting with gnome-shell with dependencies.
Just needed to write this down :-D
Discussed here
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Man files to pdf

Postby viking60 » 02 Jun 2012, 11:32

I find it useful to save some man pages as pdf especially those about network and connetions.
This will write man netcfg to a pdf file:

Code: Select all

man -t netcfg -->netcfg.pdf


man -t will write the file in postscript format (via ps2pdf) that can be transfered to pdf.
if you do a

Code: Select all

man  netcfg -->netcfg.pdf
the pdf file will be created but there will be no content.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Arch Linux tips 'n tricks - space problems

Postby viking60 » 04 Jul 2012, 12:28

When in space problems
Use ncdu -x / as root to see where space is taken.
Use pacman -Qdt to see orphan packages
Use bleachbit (AUR) to recover some
Use cacheclean (AUR) to limit # of old packages
Use pacgraph -c | less to
see which packages are largest disk users and ask yourself if you can do without them.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"


Return to “Tips & Tricks”