linux基础命令期末考试总结

1.关闭防火墙:service iptables stop

2.启动防火墙:service iptables start

3.mount命令:挂载某一设备使之成为某个目录名称

4.NFS服务:linux系统的数据共享

   ---其中挂载目录命令

       mount  -t  nfs  192.0.0.1/linux-nfs  /mnt(或mount  -rw  192.0.0.1/linux-nfs  /mnt)

5.移除所有人对文件hello.c的读、写及执行的权限

   # chmod a-rwx hello.c (a查看当前目录的所有文件,包括隐藏文件)

6.为文件hello.c的所有者增加执行权限

   # chmod u+x hello.c ( u代表所有者)

7.将文件hello.c设为该文件所有者所属组的其他用户可写,但其他人不能写

  # chmod g+w hello.c (g分组)

chown(将指定文件的拥有者改为指定的用户或组)

cat(在屏幕上显示文本文件的内容)
stat(显示文件或目录的各种信息)
rm(删除文件)
touch(创建文件)
useradd(创建用户):useradd –g sales jack –G company,employees //g:加入主要组、-G:加入次要组
useradd user1 //创建一个user1的用户

猜你喜欢

转载自www.cnblogs.com/20158424-hxlz/p/9316560.html