Linux: Unterschied zwischen den Versionen
Aus wiki
| (12 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
| + | == Security == | ||
Ubuntu Server Hardening | Ubuntu Server Hardening | ||
http://www.andrewault.net/2010/05/17/securing-an-ubuntu-server/ | http://www.andrewault.net/2010/05/17/securing-an-ubuntu-server/ | ||
http://ubuntuforums.org/showthread.php?t=1002167 | http://ubuntuforums.org/showthread.php?t=1002167 | ||
| + | |||
| + | === disable log === | ||
| + | Run Spaceset +o history or Spaceshopt -uo history to disable history. | ||
| + | == System Management == | ||
| + | === Install Kernel Headers === | ||
| + | sudo apt-get install linux-headers-$(uname -r) | ||
| + | === Remove all Kernel except the actual === | ||
| + | sudo apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d') | ||
| + | |||
| + | === increase volume === | ||
| + | pactl -- set-sink-volume 0 150% | ||
| + | |||
| + | === Get active CPU scheduler === | ||
| + | cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor | ||
| + | |||
| + | == Lenovo Trackpoint Speed == | ||
| + | create UDEV Rule - perm 755 root/root | ||
| + | SUBSYSTEM=="serio", DRIVERS=="psmouse", WAIT_FOR="/sys/devices/platform/i8042/serio1/serio2/sensitivity", ATTR{sensitivity}="220", ATTR{speed}="110" | ||
| + | execute command to immediate activate rules | ||
| + | sudo udevadm control --reload-rules | ||
| + | sudo udevadm trigger | ||
| + | |||
| + | == Want to kill every process accessing /data/sales on a Linux operating systems? Try: == | ||
| + | fuser -k -15 -m /data/sales | ||
| + | OR | ||
| + | fuser -k -9 -m /data/sales | ||
| + | |||
| + | == config file view == | ||
| + | Remove comments & blank lines from a config file: | ||
| + | egrep -v "^#|^$" file | ||
| + | |||
| + | == for loop == | ||
| + | for f in *.mp4; do ffmpeg -i $f -b:a 320K -vn $f.mp3; done | ||
| + | |||
| + | == usefull links == | ||
| + | https://help.ubuntu.com/community/PowerManagement/ReducedPower | ||
| + | ubuntu: PowerManagement/ReducedPower | ||
Aktuelle Version vom 14. September 2015, 23:25 Uhr
Inhaltsverzeichnis
Security
Ubuntu Server Hardening
http://www.andrewault.net/2010/05/17/securing-an-ubuntu-server/ http://ubuntuforums.org/showthread.php?t=1002167
disable log
Run Spaceset +o history or Spaceshopt -uo history to disable history.
System Management
Install Kernel Headers
sudo apt-get install linux-headers-$(uname -r)
Remove all Kernel except the actual
sudo apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')
increase volume
pactl -- set-sink-volume 0 150%
Get active CPU scheduler
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
Lenovo Trackpoint Speed
create UDEV Rule - perm 755 root/root
SUBSYSTEM=="serio", DRIVERS=="psmouse", WAIT_FOR="/sys/devices/platform/i8042/serio1/serio2/sensitivity", ATTR{sensitivity}="220", ATTR{speed}="110"
execute command to immediate activate rules
sudo udevadm control --reload-rules sudo udevadm trigger
Want to kill every process accessing /data/sales on a Linux operating systems? Try:
fuser -k -15 -m /data/sales OR fuser -k -9 -m /data/sales
config file view
Remove comments & blank lines from a config file:
egrep -v "^#|^$" file
for loop
for f in *.mp4; do ffmpeg -i $f -b:a 320K -vn $f.mp3; done
usefull links
https://help.ubuntu.com/community/PowerManagement/ReducedPower ubuntu: PowerManagement/ReducedPower