linux简单命令常用随记

时间:2023-12-14 21:13:26
 //查看网络信息
ifconfig //修改ip地址
ifconfig eth0 123.123.123.123 netmask 255.255.255.0
//网关设置
route add default gw 123.123.123.1 //服务开启、重启、停止
service mysql/httpd/named/... start/restart/stop ls -l //long format
ls -i //inode
ls -t //sorted by time
ls -h //human readable K M G
ls -a //show file like .XXX touch newfile //新建文件
vi newfile i--insert Esc退出 :wq保存退出
cat newfile
cp mv rm……
ln newfile newfilelink //hard-link -s 符号链接 chmod newfile //权限 包括rwx 读写执行 root group other echo eg. echo “something in file”>fille.txt echo “This file's contents”>>fille.txt
重定向 >  >>
nslookup
ping
管道 |
ps

如下模式要搞搞清楚,先记下来:

linux简单命令常用随记

有道词典
重定向 > >>

详细X

Redirect > > >