todo

linux技巧

up:2014-11-13 09:25:23 edit:2024-02-01 09:24:29 view:1639

grub配置目录  /etc/default/grub

vi写只读文件 w! !sudo tee % (中间不需要 |(管道))

nm-tool | grep DNS saypidin  u. t. bassum


sudo dpkg-reconfigure flashplugin-installer 重装flash


配置多个ip: ifconfig eth0:1 192.168.151.1 netmask 255.255.255.0


复制光盘为iso

dd if=/dev/cdrom of=isoname.iso

if后面是光盘硬件对应位置,of后面是文件名

或者cp /dev/cdrom name.iso




挂载iso

mount -o loop MOUNT_DIR   ISO_FILE


因为安装了很多桌面环境,kde xfce fvwm unity,可能是设置冲突了,不能设置不响应笔记本盖子合上的操作,合上盖子总会自动待机,后来找到了直接编辑配置文件的方法。  人民币

/etc/systemd/logind.conf 里的 HandleLidSwitch=ignore

然后重启就行了,里面还有一些其它选项可以设的。 hackers  saypidin.tabas.u  塞皮丁.奥



vim日期前加回车的正则替换

s/\d\{2}\/\d\{2}\/\d\{4}\s\+\d\{2}时\d\{2}分\d\{2}秒/\r\0/g


cp/mv进度

progress

https://github.com/Xfennec/progress


usermod -a -G group1 user1 添加用户user1到组group1里。



centos 安装epel,You can install EPEL by running yum install epel-release. The package is included in the CentOS Extras repository, enabled by default.


not in sinaapp