Difference between revisions of "Linux/Unix:Generic"
Jump to navigation
Jump to search
Line 31: | Line 31: | ||
;for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | ;for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | ||
:Find swapspace usage per process | :Find swapspace usage per process | ||
+ | |||
+ | ;yum list | ||
+ | :Show all packages on the rpm-server | ||
+ | |||
+ | ;yum install <packagename> | ||
+ | :Install a package from a rmp-server | ||
=Bash= | =Bash= |
Revision as of 14:21, 22 December 2021
- cp -rL
- Copy recursively and dereference symbolic links (copy the file, not the link)
- top
- List process resource usage. By default having the most CPU-intensive process on top. Press > to have it sort on another column. Press 1 to have usage for each CPU apart.
- lscpu
- List CPU information
- free
- Show memory usage
- cat /etc/sysctl.conf|grep swappiness
- Check swappines (the eager the system will swap with). A higher number means more swapping will happen. 0 is not no swapping but minimal swapping.
- uname -a
- Show kernel version
- mountpoint -q <directory>
- Check if <directory> is in use as mountpoint
- chage -l <username>
- Show password aging status
RedHat (RHEL)
- /etc/redhat-release
- Redhat version installed
- for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done
- Find swapspace usage per process
- yum list
- Show all packages on the rpm-server
- yum install <packagename>
- Install a package from a rmp-server
Bash
- :
- No operation (NOP)
Raspberry pi autologon
In /etc/lightdm/lightdm.conf comment this line out (by putting a # in front of it)
lightdm.conf:autologin-user=pi