Linux Tips

Linux Tips

Linux Tips

linux双系统之后要执行

grub2-mkconfig -o /boot/grub2/grub.cfg
# 而且先装win是没必要的,但是这样的话需要开机按f10(或者其他)來选择系统,用f2來选择默认系统。(反正对我一般用linux的來说没关系)

Cannot change ownership to uid 1000 , gid 1000: Permission denied

tar xzf $INPUT_FOLDER/archive.tar.gz --no-same-owner -C

su 不能切换

chmod u+s,g-w,o-w /bin/su

开机调节亮度

sudo vi /etc/rc.local
: #! /usr/bin/bash
: echo 80 > /sys/class/backlight/intel_backlight/brightness
: exit 0
sudo ln -s /etc/rc.local /etc/rc.d/rc.local
sudo service rc-local start
echo $?
sudo service rc-local status

定时关机

shutdown -r now                 # 关机后重启
shutdown -h now                 # 关机后不重启
shutdown -r +10                 # 10 分钟后重启
shutdown -r 10:00               # 10 点钟重启
shutdown -h +10                 # 10分钟后关机
shutdown -h 10:00               # 10 点钟关机
#Debian, Ubuntu.
sudo ln -s /opt/lampp/lampp /etc/init.d/lampp
sudo update-rc.d lampp start 80 2 3 4 5 . stop 30 0 1 6 .

# RedHat, Fedora, CentOS. If your Linux distro uses "chkconfig" tool to install the services you can run the following commands:
sudo ln -s /opt/lampp/lampp /etc/init.d/lampp
sudo chkconfig --add lampp
yum install yum-utils
package-cleanup --oldkernels --count=1

Date: 2015-01-22 21:38:28

Author: sunx

Created: 2015-01-22 Thu 21:39

Emacs 24.4.2 (Org mode 8.2.10)

Validate

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。