Linux Learning Notes

1. .sh file are executable script file.
2. When downloading a file from internet, the attribute of file may change. like executable file loses its executable permission.
3. get the version of currently running kernel : uname -r
4. /opt dir is used to put software installation files in. in old days, people use /usr/local instead
5. /proc is a virtual file system. All the data under this dir actually reside in the memory.
6. /usr contains some important program files, GUI files, extra function lib, softwares installed, and shared dir or files. It functions like the dir "Program Fils" in Windows.
7. /var: used to contain variable files when the system runs

  typical instance: /var/log
8. /etc, /bin, /sbin, /dev, /lib, /  should not be seperated into different partition.
   This is because only the root dir will be loaded when the system start. At the same time,
   system must get some information like the init program from these dirs.
9. A common partition strategy is put below dirs into different partition :
   -/     : 1G
   -/boot : 50M
   -/usr  : intallation data need a large space :10G
   -/home : user data : 10G
   -/var  : 1G

1. In man page, we can input /string or ?string to search the string forward or backward
2. The command [sync] can be used to write all the data in memory into disk before shutdown.
 
  It is recommended to execute this command much more times.
3. [reboot] = shutdown -r now
4. use alt+ctrl+backspace to restart X window
5. how to get the passwd of root,ubuntu下也是有root用户的!
   安装的时候,让你输入代替root用户的名称与密码
   使用su root切换root的时候会要求你输入密码,这时候你输入什么都不对的
   要想使用的哈,需要给root设置密码
   sudo passwd root
   然后输入两次密码
   su root 在输入密码就可以切换到root了!
6. 如果要对他人开放某个目录的话,一定要开放该目录的x(可执行权限),否则用户进入不了该目录
7. 增加用户组 groupadd groupname
   增加用户: adduser username  % only root has the permission to create user and usrgroup
   adduser username groupname % 将用户添加到用户组中
8. chgrp: 改变文件所属用户组 
   e.g: chgrp groupname filename
   chown: 改变文件拥有者
   e.g: chown fredchen file
   chmod: 改变文件属性,SUID等信息
   note : -R option can be used to recursively change all the file or sub-dir
          contained in a dir 
9. 目录属性的意义
   -r : 表示具有读取目录结构清单的权限,可以用ls 命令读取
   -w : 将拥有以下权限:
        (1) 建立新的文件与目录
       (2)删除已经存在的文件与目录(不论该文件属于谁)
        (3) 将已存在的文件或目录进行重命名
        (4) 移动该目录内的文件,目录的位置
   -x : 表示具有进入该目录的权限
10. su user 可以用来改变用户身份为user.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值