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. 循序渐进开发WinForm项目(4)--Winform界面模块的集成使用

    随笔背景:在很多时候,很多入门不久的朋友都会问我:我是从其他语言转到C#开发的,有没有一些基础性的资料给我们学习学习呢,你的框架感觉一下太大了,希望有个循序渐进的教程或者视频来学习就好了. 其实也许我 ...

  2. (三)XmlHelper

    [转]http://blog.csdn.net/u011866450/article/details/50373222 using System.Xml; using System.Data; nam ...

  3. easyui-简单用法寄一些属性

    Easyui 总结 优点: A.简单易用 继承 jQuery 简易使用特性,提供高度抽象接口,短期改善网站易用性. B.开源免费 采用 MIT & GPL 双协议授权,轻松满足自由产品至企业产 ...

  4. 【jQuery基础学习】04 jQuery中的表格操作及cookie插件的使用

    这章本来准备写成jQuery的表单操作和表格操作的. 然而昨天吧jQuery的表单操作看完,发现全部在炒之前章节的剩饭,所以就没写出来. 那么今天就来看看表格吧. 因为平常做的都是公司的内部管理系统, ...

  5. Urlencode and Urldecode 命令行

    由于经常使用,简单记录之 $ alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.ar ...

  6. PHP学习笔记:利用时间和mt_rand函数获取随机名字

    这个知识会在文件上传等场合用到,还没学面向对象,现在用函数形式呈献给各位,代码都做了备注,有不懂得可以在线提问. <?php /** * Created by PhpStorm. * User: ...

  7. Ahjesus Nodejs02 使用集成开发环境

    下载最新版webstorm, 选择此集成开发环境是因为支持性较好,在vs下也有插件支持,不过感觉有些牵强 附vs插件 NTVS 详细介绍 安装好以后就需要配置npm NPM 国内高速镜像 source ...

  8. bootstrap dialog自行控制窗口的关闭

    在使用dialog的时候,我们通常不希望点击btn的时候自动隐藏dialog,通常需要做一些清理或者ajax操作,在bootstrap dialog中,这是通过 data-dismiss=" ...

  9. [性能] Bean拷贝工具类性能比较

    Bean拷贝工具类性能比较 引言 几年前做过一个项目,接入新的api接口.为了和api实现解耦,决定将api返回的实体类在本地也建一个.这样做有两个好处 可以在api变更字段的时候保持应用稳定性 可以 ...

  10. (三)play之yabe项目【数据模型】

    (三)play之yabe项目[数据模型] 博客分类: 框架@play framework   创建项目 play new yabe What is the application name? [yab ...