1. linux 基础命令

who, which, basename, dirname, echo, type, hash, whatis, makewhatis, man, info, help, ls, cd,pwd, mkdir, rmdir, touch, rm, date, hwcolck, cal, shutdown, reboot, tty

1 who : Show who is logged on, print information about users who are currently logged in.

  显示登录的用户。

2 which : Show the full path of (shell) commands

  which pwd, which shutdown

3 basename : Print name with any leading directory components removed.

  basename /usr/bin/sort , Output: sort

4 dirname : strip non-directory suffix from file name

  dirname /usr/bin/sort , Output: /usr/bin

5 命令替换

  ‘ ’ :强引用,变量不会替换;

  “ ” :若引用,变量可以替换;

  ` ` :命令应用,类似$()

6 echo : display a line of text , 回显

  echo $PATH , Output: /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

  echo '$PATH' , Output: $PATH

  echo "zhu biao" , Output: zhu biao

  echo `date +%F`(echo $(date +%F)) , Output: 2016-10-26

7 type : Display information about command type

  type cd , Output: cd is a shell builtin

  type shutdown , Output: shutdown is /sbin/shutdown, 若shutdown已经执行过,将会添加到hash数据库,则:shutdown is hashed (/sbin/shutdown)

8 hash : Rember or display program loacations, 显示hash数据库,执行过的程序次数、位置。

9 whatis : 简洁描述某个命令的功能,该命令在manual文档中的章节

  whatis shutdown , Output:

            shutdown    (2)  - shut down part of a full-duplex connection
            shutdown    (3p)  - shut down socket send and receive operations
            shutdown    (8)  - bring the system down

10 makewhatis : Create the whatis datebase

11 shell command 分为内部命令和外部命令

  内部命令帮助:help command

  外部命令帮助:command --help, man command, info command

12 man : man [section] command , manual , 命令,配置文件格式,库调用等帮助文档

  [section]:

  1: User Commands
     2: System Calls
     3: C Library Functions
     4: Devices and Special Files
     5: File Formats and Conventions
     6: Games et. Al.
     7: Miscellanea
     8: System Administrations tools and Deamons

13 info : 获取在线帮助文档,使用方法类似man

14 help : shell内部命令帮助文档

  help ls

15 {a,b} : 可展开

  {a,b}/{x,y} : a/x a/y b/x b/y

  {a,b}-heburn-{x,y} : a-heburn-x a-heburn-y b-heburn-x b-heburn-y

16 ls : list directory contents

  ls /home/zhubiao

17 cd : change the shell working directory

  cd /home/zhubiao

  cd ~ : 回到用户家目录

  cd ~zhubiao : 回到用户zhubiao家目录

  cd - : 回到上一个目录

18 pwd : Print working directory

19 mkdir : make directories

  Create directories /mnt/linux/bin, /mnt/linux/sbin, /mnt/bin, /mnt/sbin 可用如下命令:

  mkdir -pv /mnt{/linux/{bin/sbin},bin,sbin}

20 rmdir : remove empty diretories

  rmdir /mnt

  rmdir -p /a/b

21 rm : remove files or directories

  rm -rf /a/b/zhubiao

22 touch : 创建文件

23 date : print or set the system date and time

  date [MMDDhhmm[[CC]YY][.ss] :

    date 10262318 设定系统时间为10月26日 23:18,

    date 102623182016.33 设定系统时间为 2016-10-26 23:18:33

    date +%F , Output: 2016-10-26

    date +%T , Output: 23:18:33

    -s : --set "CCYY-MM-DD hh:mm:ss"

24 hwclock : query or set the hadway clock (RTC)

  hwclock --set --date="2016-10-10 23:12:10"

  hwclock -s(--hctosys)

  hwclock -w(--systohc)

25 cal : Display a calendar

  cal , Output:

      October 2016   
      Su Mo Tu We Th Fr Sa
                         1
       2  3  4  5  6  7  8
       9 10 11 12 13 14 15
      16 17 18 19 20 21 22
      23 24 25 26 27 28 29
      30 31

26 shutdown : bring the system down

  shutdown -h now

  shutdown -r +5

27 reboot : reboot, halt, poweroff - reboot or stop the system

28 ternial

  a.虚拟终端 tty#

  b.物理终端 console

  c.伪终端 pts/#

  

一. Linux 常用命令总结的更多相关文章

  1. Linux常用命令(一)

    Linux常用命令 1. pwd查看当前路径(Print Working Directory)    [root@CentOS ~]# pwd/root 2. cd .. 返回上一级 .. 表示上一级 ...

  2. linux常用命令的介绍

    本文主要介绍Linux常用命令工具,比如用户创建,删除,文件管理,常见的网络命令等 如何创建账号: 1. 创建用户 useradd -m username -m 表示会在/home 路径下添加创建用户 ...

  3. linux——常用命令与脚本

    linux常用命令 --文件管理pwd --查看当前目录cd --切换当前目录ls --列出当前目录下的所有文件touch --创建文件mkdir --建立目录rmdir --删除空目录rm --删除 ...

  4. DOS 和 Linux 常用命令的对比

    DOS 和 Linux 常用命令的对比 许多在 shell 提示下键入的 Linux命令都与你在 DOS 下键入的命令相似.事实上,某些命令完全相同. 本附录提供了 Windows的 DOS 提示下的 ...

  5. 第一章,Linux常用命令

    20161124 Linux常用命令1.find find /etc/ -size +50k -lsfind /etc/ -size +50k -ls 2> /dev/null查看目录下大于50 ...

  6. linux 常用命令大全

    linux 常用命令大全 系统信息 arch 显示机器的处理器架构(1) uname -m 显示机器的处理器架构(2) uname -r 显示正在使用的内核版本 dmidecode -q 显示硬件系统 ...

  7. Linux 常用命令行

    Linux常用命令行 第一部分: cd命令 第二部分:文件操作 第三部分:压缩包操作

  8. [工作需求]linux常用命令以及vim常用命令

    一.             Linux 常用命令 mkdir dirname新建文件夹 cd ~ 进入自己的家目录 cd dirname 进入名字为dirname的目录: l 显示当前文件夹下的文件 ...

  9. 对于我的linux常用命令的说明

    我所列出的linux常用命令中的选项并不是全部的选项,是一些我们经常用到的linux命令及选项

  10. Linux 常用命令笔记

    Linux 常用命令笔记 1. locate locate:用来定位文件的位置,如:locate a.txt 但是这个命令有延迟,也就是新建的文件不一定能搜索到,如果非要找到新建的文件可以使用 upd ...

随机推荐

  1. undefined reference to `omp_get_max_threads'

    原因是缺少 libgomp/openmp 库的链接 配置和解决方法参考: http://www.code-by.org/viewtopic.php?f=54&t=163

  2. C#类的一些概念

    一.概念 1.类的作用是来模拟现实对象的,一个现实对象可以从两个地方进行描述:特征和行为. 2.类不是你凭空想象的,它只是描述现实对象具体的特征和行为的. 3我们写类只需要写我们所需要的. 4.类是提 ...

  3. C#设计模式——迭代器模式(Iterator Pattern)

    一.概述在软件开发过程中,我们可能会希望在不暴露一个集合对象内部结构的同时,可以让外部代码透明地访问其中包含的元素.迭代器模式可以解决这一问题.二.迭代器模式迭代器模式提供一种方法顺序访问一个集合对象 ...

  4. 重新想象 Windows 8 Store Apps (47) - 多线程之线程同步: Semaphore, CountdownEvent, Barrier, ManualResetEvent, AutoResetEvent

    [源码下载] 重新想象 Windows 8 Store Apps (47) - 多线程之线程同步: Semaphore, CountdownEvent, Barrier, ManualResetEve ...

  5. 小白学Linux(三)--文件系统基本结构

    Linux文件系统是一个倒立的单根树状结构,文件名称严格区分大小写(windows系统则是对大小写不明感的).路径用“/”分隔,跟windows的“\”不同. 这里我画了一张一般Linux系统的正常目 ...

  6. Hibernate框架之关联映射入门

    关联映射就是将关联关系映射到数据库里,在对象模型中就是一个或多个引用. 一:配置单向多对一关联 在Emp类中定义一个Dept属性,而在Dept类中无须定义用于存放Emp对象的集合属性 01.Dept. ...

  7. 面向企业客户的制造业CRM系统的不成熟思考

    CRM就是客户关系管理(Customer Relationship Management),一直一知半解,最近有涉及这方面的需求,所以稍作研究,并思考一些相关问题. CRM是什么? CRM具体如何定义 ...

  8. Android 手机卫士11--窗体弹出PopupWindow

    protected void showPopupWindow(View view) { View popupView = View.inflate(this, R.layout.popupwindow ...

  9. 关于原生的Javascript

    JQuery是个好工具,它做了太多的事. 以至于让人渐渐忘记原生的JS该怎么写了,导致连为了用个DOM选择器或者Ajax就直接加个JQuery,确实,JQuery太方便了. 坏处: 由于JQuery的 ...

  10. javascript --- Ajax基础

    神马是Ajax? Ajax即‘Asynchronous javascript and XML’(异步javascript和XML),也就是所谓的无刷新页面读取技术. http请求 首先要了解http请 ...