Linux 学习小记

1.Linux Shell:

  • GUI:GNOME
  • CLI:BASH

2.Bash commands:

  • hostname      :check the name of host
  • uname           :parameters -r ,-a ;The basic info of Linux
  • &                   :behind of commands to contiune the commands.
  • history           :check the all commands having been used
  • !!                   :rerun the last command
  • !a                  :rerun the last command with 'a'
  • !num             :rerun the command by ordered.
  • !?ab              :run the command contains 'ab'
  • !-n                 :run the command recorded nth desc;
  • Ctrl+r            :search the commands in history.
  • esc , .           :re-invoke the parameters of last command in current command.



bash Wildcard character:

*;    ?  ;   [0-9]   ;  [abc]  ;  [^abc]




3.Change the user:

  • su -      : use the root user using the new terminal
  • su       : user the root user without using the new terminal
  • sudo    : use the permission of admin to run commands(the current user has been grant the permission of sudo)
  • id      :check the info of current user
  • passwd  :modify or reset the password of current user


4.BASH task management

  • command &:
  • jobs               : check the all tasks running in the background.
  • ctrl + Z          : suspend the current process
  • ctrl + C          : stop the current process
  • bg + num      : restart the process[num] in background
  • fg                  : restart the process[num] in front ground


5.File management

  • cp            :copy the file
  • cp -r         :copy the whole directory
  • cp -rv       :show the detail info when copying the whole directory
  • mv           :move the file
  • touch       :create a new file or update the time about the existed file
  • rm            :delete file
  • rm -r        :delete the whole directory no empty
  • rm -ri       :list the notice info about the file to be deleted
  • rm -rif      :force to delete the whole file without any notice
  • mkdir       :create a new directory
  • rmdir        :delete a empty directory


6.The tree structure of the liunx file system

  • /:
  •     bin       : common runnable Linux commands
  •     boot     : Linux boot directory.(kernel file)
  •     dev      : store the hardware devices in form of files
  •     etc       : almost all configuration files
  •     home   : including the user directory stored the user's private files
  •     root      : the root user's directory
  •     lib         : almost all the library files
  •     media   : the auto mount directory
  •     mnt       : the normal mount directory    
  •     opt        : the installation directory of large soft.
  •     proc      : the visual directory not stored in hard disk  (real time info of system).
  •     sbin       : the Linux commands only run by super user(root)
  •     sys        : the bottom hardware info included
  •     temp     : the temp directory will be deleted auto
  •     usr        : the installation directory of the common soft
  •     var        : storing the variable the info such as email or logs







  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值