大家好,感谢邀请,今天来为大家分享一下Linux基础命令汇总:100条必知指令大全的问题,以及和的一些困惑,大家要是还不太明白的话,也没有关系,因为接下来将为大家分享,希望可以帮助到大家,解决大家的问题,下面就开始吧!
原文:https://www.howtoforge.com/linux-commands/
这篇文章的特点是非常简洁,过滤掉了大约100条复杂的Linux命令行,非常适合入门学习。
此外,以“词条+例题”的形式组织领域知识,类似于编词典,可以促进学习者在编辑过程中加深理解,也便于日后不断改进(添加注释、参考文献、索引、等),这是一种很好的学习方式。
最后,在整理这些命令行的时候,我发现操作系统最重要的工作其实就是文件的管理。创建、移动、查看、编辑、销毁和检索都是围绕文件进行的操作。其实也是实际工作中的操作。最常用的需求。对于开发者来说,利用Linux命令行模板、命名风格、人机交互以及小而美的实现方式来推动其在其他领域的应用和完善,是大有裨益的。
linux内核里面
Adduser/Addgroup
类别:权限管理;添加用户和用户组
adduser 和addgroup 命令允许您分别向系统添加新用户和组。这是adduser: 的示例
$ sudo adduser 测试用户
添加用户“testuser”.
添加新组“testuser”(1003).
添加新用户“testuser”(1003)和组“testuser”.
创建主目录“/home/testuser”.
从“/etc/skel”复制文件.
输入新的UNIX 密码
Arch
类别:系统信息;查看CPU架构
arch 命令用于打印机器的架构。例如:
$拱门
i686
不确定“i686”是什么意思?前往这里。
Cal/Ncal
类别:系统信息;查看日历
cal 和ncal 命令在输出中显示日历。
$卡路里
2017年3月
苏莫图我们Th Fr 萨
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
$ncal
2017年3月
苏5 12 19 26
钼6 13 20 27
图7 14 21 28
我们1 8 15 22 29
第2 9 16 23 30
法语3 10 17 24 31
Sa 4 11 18 25
Cat
类别:文件管理;查看文件内容
cat 命令允许您连接文件或标准输入上提供的数据,并将其打印在标准输出上。通俗地说,该命令打印提供给它的信息,无论是通过stdin 还是以文件的形式。
$猫测试.txt
你好吗?
Cd
类别:文件管理;切换工作目录
cd 命令用于更改用户当前的工作目录。
$ cd /home/himanshu/
Chgrp
类别:文件管理、权限管理;切换文件所属组
chgrp 命令允许您更改文件的组所有权。该命令期望新组名称作为其第一个参数,文件名(其组正在更改)作为第二个参数。
$ chgrp howtoforge test.txt
Chmod
类别:文件管理、权限管理;切换文件执行权限
chmod 命令允许您更改文件的访问权限。例如,如果您有一个二进制文件(例如helloWorld),并且希望使其可执行,则可以运行以下命令:
chmod +x helloWorld
Chown
类别:文件管理、权限管理;切换文件所有者
chown 命令允许您更改文件的所有权和组。例如,要将文件test.txt 的所有者更改为root,并将其组设置为root,请执行以下命令:
chown root:root test.txt
Cksum
类别:文件管理;查看文件属性
cksum 命令打印输入文件的CRC 校验和和字节计数。
$cksumtest.txt
3741370333 20测试.txt
不确定校验和是什么?前往这里。
Clear
类别:人机交互;清晰的屏幕
Clear命令用于清除终端屏幕。
$clear
Cmp
类别:文件管理;文件逐字节比较
cmp命令用于对两个文件进行逐字节比较。
$ cmp 文件1 文件2
file1 file2 diff: byte 1, line 1
Comm
类别:文件管理;文件比较
comm 命令用于逐行比较两个排序的文件。例如,如果“file1”包含数字1-5,“file2”包含数字4-8,则在这种情况下“comm”命令会生成以下内容:
$ comm file1 file2 支持选项:
-1:不显示第一个文件中出现的内容;
-2:不显示第二个文件中出现的内容;
-3:不显示两个文件中都出现的内容。
Cp
类别:文件管理;文件复制
cp命令用于复制文件和目录。
$ cp test.txt /home//himanshu/Desktop/
Csplit
类别:文件管理;待添加内容
csplit 命令允许您将文件分割为由上下文行确定的部分。例如,要将文件拆分为两部分,其中第一部分包含“n-1”行,第二部分包含其余部分,请使用以下命令:
$ csplit file1 [n]这两部分分别保存为名为“xx00”和“xx01”的文件。
Date
类别:系统信息;查看系统时间
date 命令可用于打印(甚至设置)系统日期和时间。
$日期
2 月28 日星期二17:14:57 IST 2017
Dd
类别:文件管理;待补充内容
dd 命令复制文件,根据操作数进行转换和格式化。例如,以下命令创建/dev/sda 分区的映像。
dd if=/dev/sda of=/tmp/dev-sda-part.img
Df
类别:文件管理;查看文件系统利用率
df 命令在输出中显示文件系统磁盘空间使用情况。
$ df /dev/sda1
文件系统已使用1K 块可用使用% 安装于
/dev/sda1 74985616 48138832 23014620 68%/
Diff
类别:文件管理;文件逐行比较
diff 命令允许您逐行比较两个文件。
$ diff file1 file2
Diff3
类别:文件管理;文件比较,三个文件
diff3 命令,顾名思义,允许您逐行比较三个文件。
diff3 file1 file2 file3
Dir
类别:文件管理;查看当前目录文件列表
dir 命令列出目录内容。例如:
$ 目录
test1 test2 test.7z test.zip
Dirname
类别:文件管理;查看当前目录
dirname 命令从文件名/路径中删除最后一个部分。通俗地说,您可以将其视为一个工具,例如从文件的绝对路径中删除文件名。
$ 目录名/home/himanshu/file1
/home/himanshu
Dmidecode
类别:系统信息;查看硬件信息
dmidecode 命令以人类可读的格式打印系统的DMI(又名SMBIOS)表内容。
$ sudo dmidecode
#dmide代码2.12
SMBIOS 2.6 存在。
50个结构体占用2056字节。
表位于0x000FCCA0。
句柄0x0000,DMI 类型0,24 字节
BIOS信息
供应商: 美国大趋势公司
版本: 080015
发布日期: 2011 年8 月22 日
.
.
.DMI(桌面管理接口,DMI)是一个帮助收集计算机系统信息的管理系统。 DMI信息的采集必须严格按照SMBIOS规范进行。 SMBIOS(系统管理BIOS)是主板或系统制造商需要遵循的统一规范,以标准格式显示产品管理信息。 SMBIOS 和DMI 是由行业指导组织桌面管理任务组(DMTF) 起草的开放技术标准。 DMI设计适用于任何平台和操作系统。
Du
类别:文件管理;查看指定目录的磁盘利用率
du 命令显示目录及其子目录中存在的文件的磁盘使用情况。
$ du /home/himanshu/Desktop/
92 /home/himanshu/桌面/下载/meld/meld/ui
88 /home/himanshu/桌面/下载/meld/meld/vc
56 /home/himanshu/桌面/下载/meld/meld/matchers
12 /home/himanshu/桌面/下载/meld/meld/__pycache__
688 /home/himanshu/桌面/下载/meld/meld
16 /home/himanshu/桌面/下载/meld/bin
328 /home/himanshu/桌面/下载/meld/data/ui
52 /home/himanshu/Desktop/Downloads/meld/data/icons/svg
Echo
echo 命令显示为其提供的任何输入文本。
$ 回声你好嗨
hello hi
Ed
类别:文件管理;编辑
ed 是一个面向行的文本编辑器。
$ed 是一个单行纯文本编辑器。它有两种工作模式:命令模式和输入模式。
支持选项:
A:切换到输入模式,在文件最后一行后输入新内容;
C:切换到输入模式,将最后一行内容替换为输入内容;
i:切换到输入模式,在当前行前添加一个新的空行来输入内容;
d:用于删除最后一行文本;
n:用于显示行号和最后一行的内容;
w:文件名:给定的文件名保存当前正在编辑的文件;
q:退出ed 编辑器。
Eject
类别:媒体管理;卸载
弹出命令允许您弹出可移动介质(通常是CD ROM 或软盘)
$弹出
Env
类别:系统信息;查看用户环境变量
env 命令不仅显示当前环境,还允许您编辑它。
$ env
Exit
类别:交互;出口
exit 命令导致shell 退出。
$ exit
Expand
类别:文件管理;编辑;将TAB 字符替换为空格
Expand 命令将输入文件中的制表符转换为空格,并将文件内容写入标准输出。
$ Expand file1
Expr
类别:计算器;表达
expr 命令计算表达式。例如:
$ 表达式1 + 2
3
Factor
类别:计算器;因式分解质因数
Factor 命令打印输入数字的质因数。
$ 系数135
135: 3 3 3 5
Fgrep
类别:文件管理;搜索;匹配指定文件字符
fgrep 命令与使用-F 命令行选项执行时的grep 命令等效。该工具也称为固定或快速grep,因为它不将正则表达式元字符视为特殊字符,而是将信息处理为简单字符串。
例如,如果您想在文件中搜索点(.),并且不希望grep 将其解释为通配符,请按以下方式使用fgrep:
$ fgrep "." [file-name]
Find
类别:文件管理;搜索;
find 命令允许您搜索目录及其子目录中的文件。
$ 查找测试*
测试
测试1
测试2
测试.7z
测试.c
测试.txt
Linux Find 命令的更多示例:
* 适合初学者的14 个Linux Find 命令实用示例
* 使用find 命令搜索文件和文件夹
* 在命令行上查找文件
Fmt
类别:文件管理;读取文件内容和格式输出(请参阅支持选项)
fmt 是一个简单的最佳文本格式化程序。它重新格式化传递给它的文件中的每个段落,并将文件内容写入标准输出。
$ fmt file1
Fold
类别:交互;控制文件内容输出时占用的屏幕宽度
折叠命令将每个输入行换行以适合指定的宽度。
$ 折叠-w 10
嗨,我的名字是希曼舒·阿罗拉
嗨我的名字
是希曼斯
hu Arora
Free
类别:系统信息;绩效监控;查看内存利用率。详细介绍更多
free 命令显示系统中可用和已使用的内存量。
$ 免费
缓存的已用空闲共享缓冲区总数
内存: 1800032 1355288 444744 79440 9068 216236
-/+ 缓冲区/cache: 1129984 670048
Swap: 1832956 995076 837880 参考:基于Linux单机的负载评估
参考:Netflix 性能分析模型:60 秒内
Grep
类别:文件管理;搜索;
grep 命令在一个或多个文件中搜索指定的模式,并显示在包含该模式的输出行中。
$ grep 你好测试.txt
你好吗?
Linux Grep 命令的更多教程和示例:
* 如何在shell上使用grep搜索文件中的字符串
* 如何使用Grep 在文件中执行模式搜索
Groups
类别:文件管理;搜索;
groups 命令显示用户所属组的名称。
$ 组himanshu
himanshu : himanshu adm cdrom sudo Dip Plugdev lpadmin sambashare
Gzip
类别:文件管理;压缩
gzip 命令压缩输入文件,将文件本身替换为扩展名为.gz 的文件。
$ gzip file1
Gunzip
类别:文件管理;减压
使用gzip 命令压缩的文件可以使用gunzip 命令恢复到其原始形式。
$gunzip file1.gz
Head
类别:文件管理;查看文件
head命令将文件的前10行显示到标准输出
$头CHANGELOG.txt
BEEBEEP(安全LAN 通讯器)
蜂鸣音
2.0.4
- 一些GUI 改进(新图标、文件共享树加载速度更快)
- 新消息到达时始终发出蜂鸣声(选项)
- 最喜欢的用户(右键单击用户并启用星形按钮)位于列表顶部
- 改进了群组可用性
-奥夫尔
ine users can be removed from list (right click on an offline user in list and then remove) - Clear all files shared (option) - Load minimized at startup (option)Hostname
分类:系统信息;host name The hostname command not only displays the system"s host name, but lets them set it as well. $ hostname himanshu-desktopId
分类:系统信息;用户信息 The id command prints user and group information for the current user or specified username. $ id himanshu uid=1000(himanshu) gid=1000(himanshu) groups=1000(himanshu),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),124(sambashare)Kill
分类:进程管理; The kill command, as the name suggests, helps user kill a process by sending the TERM signal to it. $ kill [process-id]Killall
分类:进程管理; The killall command lets you kill a process by name. Unlike kill - which requires ID of the process to be killed - killall just requires the name of the process. $ killall nautilusLast
分类:安全管理;查看最近登录用户 The last command shows listing of last logged in users. $ last himanshu pts/11 :0 Thu Mar 2 09:46 still logged in himanshu pts/1 :0 Thu Mar 2 09:46 still logged in himanshu :0 :0 Thu Mar 2 09:42 still logged in reboot system boot 4.4.0-62-generic Thu Mar 2 09:41 - 10:36 (00:54) himanshu pts/14 :0 Wed Mar 1 15:17 - 15:52 (00:35) himanshu pts/13 :0 Wed Mar 1 14:40 - down (08:06)Ldd
分类:软件包管理;查看一个共享库的依赖 The ldd command displays in output dependencies of a shared library. $ ldd /lib/i386-linux-gnu/libcrypt-2.19.so linux-gate.so.1 =>(0xb77df000) libc.so.6 =>/lib/i386-linux-gnu/libc.so.6 (0xb75da000) /lib/ld-linux.so.2 (0x80088000)Ln
分类:文件管理;链接 The ln command is used for creating link between files. For example, the following command would create a link named "lnk" to a file with name "test.txt": $ ln test.txt lnkLocate
分类:文件管理;搜索 The locate command helps user find a file by name. $ locate [file-name]Logname
分类:登录信息; The logname command prints the user-name of the current user. $ logname himanshuLs
分类:文件管理;查看文件列表 The ls command lists contents of a directory in output. $ ls progress capture.png hlist.o progress progress.h sizes.c hlist.c LICENSE progress.1 progress.o sizes.h hlist.h Makefile progress.c README.md sizes.oLshw
分类:系统信息;查看硬件信息 The lshw command extracts and displays detailed information on the hardware configuration of the machine. $ sudo lshw [sudo] password for himanshu: himanshu-desktop description: Desktop Computer product: To Be Filled By O.E.M. (To Be Filled By O.E.M.) vendor: To Be Filled By O.E.M. version: To Be Filled By O.E.M. serial: To Be Filled By O.E.M. width: 32 bits capabilities: smbios-2.6 dmi-2.6 smp-1.4 smp ... ... ..Lscpu
分类:系统信息;查看硬件信息-CPU The lscpu command displays in output system"s CPU architecture information (such as number of CPUs, threads, cores, sockets, and more). $ lscpu Architecture: i686 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 1 On-line CPU(s) list: 0 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 1 Vendor ID: AuthenticAMD CPU family: 16 Model: 6 Stepping: 3 CPU MHz: 2800.234 BogoMIPS: 5600.46 Virtualization: AMD-V L1d cache: 64K L1i cache: 64K L2 cache: 1024KMan
分类:帮助; man lets you access reference manual for commands, programs/utilities, as well as functions. $ man lsMd5sum
分类:计算器;md5 The md5sum command lets you print or check MD5 (128-bit) checksums. $ md5sum test.txt ac34b1f34803a6691ff8b732bb97fbba test.txtMkdir
分类:文件管理;创建目录 The mkdir command lets you create directories. $ mkdir [dir-name]Mkfifo
分类:进程管理 The mkfifo command is used to create named pipes. $ mkfifo [pipe-name]More
分类:交互 more is basically a filter for paging through text one screenful at a time. $ cat [large-file] | moreMv
分类:文件管理;移动 The mv command lets you either move a file from one directory to another, or rename it. $ mv test.txt /home/himanshu/Desktop/Nice
分类:进程管理;指定进程优先级 The nice command lets you run a program with modified scheduling priority. $ nice -n[niceness-value] [program] $ nice -n15 vimNl
分类:文件管理;输出行号 The nl command writes contents of a file to output, and prepends each line with line number. $ nl file1Nm
分类:文件管理 The nm command is used to display symbols from object files. $ nm test 0804a020 B __bss_start 0804841d T compare 0804a020 b completed.6591 0804a018 D __data_start 0804a018 W data_start 08048360 t deregister_tm_clones 080483d0 t __do_global_dtors_aux 08049f0c t __do_global_dtors_aux_fini_array_entry 0804a01c D __dso_handle 08049f14 d _DYNAMIC 0804a020 D _edata 0804a024 B _end 080484e4 T _fini 080484f8 R _fp_hw 080483f0 t frame_dummy ... ... ...Nproc
分类:进程管理 The nproc command displays the number of processing units available to the current process. $ nproc 1Od
分类:文件管理 The od command lets you dump files in octal as well as some other formats. $ od /bin/ls 0000000 042577 043114 000401 000001 000000 000000 000000 000000 0000020 000002 000003 000001 000000 140101 004004 000064 000000 0000040 122104 000001 000000 000000 000064 000040 000011 000050 0000060 000034 000033 000006 000000 000064 000000 100064 004004 0000100 100064 004004 000440 000000 000440 000000 000005 000000 0000120 000004 000000 000003 000000 000524 000000 100524 004004 ... ... ...Passwd
分类:用户权限管理 The passwd command is used for changing passwords for user accounts. $ passwd himanshu Changing password for himanshu. (current) UNIX password:Paste
分类:交互 The paste command lets you merge lines of files. For example, if "file1" contains the following lines: $ cat file1 Hi My name is Himanshu Arora I Am a Linux researcher and tutorial writer Then the following "paste" command will join all the lines of the file: $ paste -s file1 Hi My name is Himanshu Arora I Am a Linux researcher and tutorial writerPidof
分类:进程管理 The pidof command gives you the process ID of a running program/process. $ pidof nautilus 2714Ping
分类:网络管理 The ping command is used to check whether or not a system is up and responding. It sends ICMP ECHO_REQUEST to network hosts. $ ping howtoforge.com PING howtoforge.com (104.24.0.68) 56(84) bytes of data. 64 bytes from 104.24.0.68: icmp_seq=1 ttl=58 time=47.3 ms 64 bytes from 104.24.0.68: icmp_seq=2 ttl=58 time=51.9 ms 64 bytes from 104.24.0.68: icmp_seq=3 ttl=58 time=57.4 msPs
分类:进程管理 The ps command displays information (in the form of a snapshot) about the currently active processes. $ ps PID TTY TIME CMD 4537 pts/1 00:00:00 bash 20592 pts/1 00:00:00 psPstree
分类:进程管理 The pstree command produces information about running processes in the form of a tree. $ pstree init???ModemManager???2*[{ModemManager}] ??NetworkManager???dhclient ? ??dnsmasq ? ??3*[{NetworkManager}] ??accounts-daemon???2*[{accounts-daemon}] ??acpid ??atopPwd
The pwd command displays the name of current/working directory. $ pwd /home/himanshuRm
分类:文件管理 The rm command lets you remove files and/or directories. $ rm [file-name]Rmdir
分类:文件管理 The rmdir command allows you delete empty directories. $ rmdir [dir-name]Scp
分类:文件管理 The scp command lets you securely copy files between systems on a network. $ scp [name-and-path-of-file-to-transfer] [user]@[host]:[dest-path]Sdiff
分类:文件管理;文本比对 side-by-side The sdiff command lets you perform a side-by-side merge of differences between two files. $ sdiff file1 file2Sed
分类:文件管理;编程工具 sed is basically a stream editor that allows users to perform basic text transformations on an input stream (a file or input from a pipeline). $ echo "Welcome to Howtoforge" | sed -e "s/Howtoforge/HowtoForge/g" Welcome to HowtoForgeSeq
分类:计算器 The seq commands prints numbers from FIRST to LAST, in steps of INCREMENT. For example, if FIRST is 1, LAST is 10, and INCREMENT is 2, then here"s the output this command produces: $ seq 1 2 10 1 3 5 7 9Sha1sum
分类:计算器 The sha1sum command is used to print or check SHA1 (160-bit) checksums. $ sha1sum test.txt 955e48dfc9256866b3e5138fcea5ea0406105e68 test.txtShutdown
The shutdown command lets user shut the system in a safe way. $ shutdownSize
分类:文件管理 The size command lists the section sizes as well as the total size for an object or archive file. $ size test text data bss dec hex filename 1204 280 4 1488 5d0 testSleep
The sleep command lets user specify delay for a specified amount of time. You can use it to delay an operation like: $ sleep 10; shutdownSort
分类:文件管理 The sort command lets you sort lines of text files. For example, if "file2" contains the following names: $ cat file2 zeus kyan sam adam Then running the sort command produces the following output: $ sort file2 adam kyan sam zeusSplit
分类:文件管理 The split command, as the name suggests, splits a file into fixed-size pieces. By default, files with name like xaa, xab, and xac are produced. $ split [file-name]Ssh
ssh is basically OpenSSH SSH client. It provides secure encrypted communication between two untrusted hosts over an insecure network. $ ssh [user-name]@[remote-server]Stat
分类:文件管理 The stat command displays status related to a file or a file-system. $ stat test.txt File: ‘test.txt’ Size: 20 Blocks: 8 IO Block: 4096 regular file Device: 801h/2049d Inode: 284762 Links: 2 Access: (0664/-rw-rw-r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2017-03-03 12:41:27.791206947 +0530 Modify: 2017-02-28 16:05:15.952472926 +0530 Change: 2017-03-02 11:10:00.028548636 +0530 Birth: -Strings
分类:文件管理 The strings command displays in output printable character sequences that are at least 4 characters long. For example, when a binary executable "test" was passed as an argument to this command, following output was produced: $ strings test /lib/ld-linux.so.2 libc.so.6 _IO_stdin_used puts __libc_start_main __gmon_start__ GLIBC_2.0 PTRh QVhI [^_] EQUAL ;*2$" GCC: (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 .... .... ....Su
分类:用户权限管理 The su command lets you change user-identity. Mostly, this command is used to become root or superuser. $ su [user-name]Sudo
分类:用户权限管理 The sudo command lets a permitted user run a command as another user (usually root or superuser). $ sudo [command]Sum
分类:文件管理 The sum command prints checksum and block counts for each input file. $ sum readme.txt 45252 5Tac
分类:文件管理 The tac command prints input files in reverse. Functionality-wise, it does the reverse of what the cat command does. $ cat file2 zeus kyan sam adam $ tac file2 adam sam kyan zeusTail
分类:文件管理 The tail command displays in output the last 10 lines of a file. $ tail [file-name]Talk
分类:网络管理 The talk command lets users talk with each other. $ talk [user-name]Tar
分类:文件管理;压缩&解压缩 tar is an archiving utility that lets you create as well as extract archive files. For example, to create archive.tar from files "foo" and "bar", use the following command: $ tar -cf archive.tar foo bar More...Tee
分类:文件管理 The tee command reads from standard input and write to standard output as well as files. $ uname | tee file2 Linux $ cat file2 LinuxTest
分类:计算器 The test command checks file types and compare values. For example, you can use it in the following way: $ test 7 -gt 5 && echo "true" trueTime
分类:性能监测 The time command is used to summarize system resource usage of a program. For example: $ time ping google.com PING google.com (216.58.220.206) 56(84) bytes of data. 64 bytes from del01s08-in-f14.1e100.net (216.58.220.206): icmp_seq=1 ttl=52 time=44.2 ms ^C --- google.com ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 44.288/44.288/44.288/0.000 ms real 0m0.676s user 0m0.000s sys 0m0.000sTop
分类:系统信息;性能监测;性能概览。详细介绍 >>>more>>> The top command gives a dynamic real-time view of a running system (in terms of its processes). For example: $ top参考:基于Linux单机的负载评估 参考:Netflix性能分析模型:In 60 SecondsTouch
分类:文件管理 The touch command lets you change file timestamps (the access and modification times). When name of a non-existent file is passed as an argument, that file gets created. $ touch [file-name]Tr
分类:文件管理 The tr command can be used to translate/squeeze/delete characters. For example, here"s how you can use it to convert lowercase characters to uppercase: $ echo "howtoforge" | tr "[:lower:]" "[:upper:]" HOWTOFORGETty
分类:资源管理 The tty command prints the filename of the terminal connected to standard input. $ tty /dev/pts/10Uname
分类:用户权限管理 The uname command prints certain system information. $ uname -a Linux himanshu-desktop 4.4.0-62-generic #83~14.04.1-Ubuntu SMP Wed Jan 18 18:10:26 UTC 2017 i686 athlon i686 GNU/LinuxUniq
分类:文件管理;待补充信息 The Uniq command is used to report or omit repeated lines. For example, if "file2" contains the following data: $ cat file2 Welcome to HowtoForge Welcome to HowtoForge A Linux tutorial website Thanks Then you can use the uniq command to omit the repeated line. $ uniq file2 Welcome to HowtoForge A Linux tutorial website ThanksUnexpand
分类:文件管理;待补充信息 The unexpand command converts spaces present in the input file(s) into tabs, and writes the file contents to standard output. $ unexpand file1Uptime
分类:系统信息;性能监测;查看负载。详细介绍 >>>more>>> The uptime command tells how long the system has been running. $ uptime 15:59:59 up 6:20, 4 users, load average: 0.81, 0.92, 0.82Users
分类:用户权限管理;待补充信息 The users command displays in output the usernames of users currently logged in to the current host. $ users himanshu himanshu himanshu himanshuVdir
分类:文件管理;待补充信息 The vdir command lists information about contents of a directory (current directory by default). $ vdir total 1088 -rw-rw-r-- 1 himanshu himanshu 4850 May 20 2015 test_backup.pdf -rw-rw-r-- 1 himanshu himanshu 2082 May 28 2015 test-filled.pdf -rw-rw-r-- 1 himanshu himanshu 7101 May 28 2015 test.pdfVim
分类:编辑器 vim is basically a text/programming editor. The name "vim" stands for Vi IMproved as the editor is upwards compatible to the Vi editor. $ vim [file-name]W
分类:性能监测 The w command displays information about the users currently on the machine, and their processes. $ w 16:18:07 up 6:39, 4 users, load average: 0.07, 0.32, 0.53 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT himanshu :0 :0 09:39 ?xdm? 1:08m 0.25s init --user himanshu pts/0 :0 09:41 6:36m 0.84s 7.84s gnome-terminal himanshu pts/10 :0 14:51 0.00s 0.16s 0.00s w himanshu pts/11 :0 15:41 35:19 0.05s 0.05s bashWall
分类:通讯;待补充信息 The wall command lets you write and send a message to other users that are currently logged in. $ wall [your-message]Watch
分类:性能监测 The watch command can be used to monitor a program"s output. It runs the program repeatedly, displaying its output and errors. For example: $ watch dateWc
分类:文件管理;待补充信息 The wc command prints newline, word, and byte counts for a file. $ wc test.txt 0 3 20 test.txtWhatis
分类:帮助 The whatis command displays single-line manual page descriptions. $ whatis mkdir mkdir (1) - make directories mkdir (2) - create a directory mkdir (1posix) - make directoriesWhich
分类:文件管理;以来 The which command basically lets you locate a command - the file and the path of the file that gets executed. For example: $ which date /bin/dateWho
分类:登录信息 The who command shows who is logged on. $ who himanshu :0 2017-03-03 09:39 (:0) himanshu pts/0 2017-03-03 09:41 (:0) himanshu pts/10 2017-03-03 14:51 (:0) himanshu pts/11 2017-03-03 15:41 (:0)Whereis
分类:文件管理;以来 The whereis command shows in output locations of the binary, source, and manual page files for a command. $ whereis ls ls: /bin/ls /usr/share/man/man1/ls.1posix.gz /usr/share/man/man1/ls.1.gzWhoami
分类:登录信息 The whoami command prints effective userid of the current user. $ whoami himanshuXargs
分类:编程工具 The xargs command builds and executes command lines from standard input. In layman"s terms, it reads items from stdin and executes a command passed to it as an argument. For example, here"s how you can use xargs to find the word "Linux" in the files whose names are passed to it as input. $ xargs grep "Linux" file1 file2 file3 file1:Linux researcher file2:A Linux tutorial website file3:Linux is opensource More...Yes
分类:交互;确认 The Yes command outputs a string repeatedly until killed.关于Linux基础命令汇总:100条必知指令大全到此分享完毕,希望能帮助到您。
【Linux基础命令汇总:100条必知指令大全】相关文章:
用户评论
这篇文章看起来很棒!一直想学习Linux,但是不知道从哪开始,现在有了这个清单应该可以让我慢慢练习了。
有15位网友表示赞同!
刚买了一台新电脑,打算把OS换成Linux, 这个清单刚好来试试手
有14位网友表示赞同!
100条命令真不少,看来学习时间有点长呀。不过还是很有帮助的入门教材啊!
有16位网友表示赞同!
我已经会一些基础的Linux命令了,希望能用这篇文章学到更多高级技巧。
有16位网友表示赞同!
分享一下自己学习Linux遇到问题的地方,说不定大家都能互相帮助
有16位网友表示赞同!
这个清单应该涵盖了很多常用的Linux命令吧?希望能够系统地学习一遍
有19位网友表示赞同!
看了一些评论都说这篇文章很不错,我也来试试
有14位网友表示赞同!
学习linux需要哪些软件环境? 这里有介绍吗?
有18位网友表示赞同!
Linux真香!学习linux可以提升我的程序开发能力
有10位网友表示赞同!
这个清单太棒了,分享给想学习Linux的朋友们!
有9位网友表示赞同!
我准备用Python结合Linux命令自动化操作一些任务,这篇文章真是刚好
有5位网友表示赞同!
从这里开始学习Linux的命令语法吧!
有9位网友表示赞同!
学习Linux最关键的核心概念是什么? 这篇文章有没有介绍?
有13位网友表示赞同!
想尝试用一个虚拟机来学习Linux,这样不会影响原有的系统文件
有18位网友表示赞同!
这个清单能让我高效地使用Linux操作系统吗?我很想提升我的效率!
有17位网友表示赞同!
学习linux需要多少时间才能入门呢?我希望能够在短时间内掌握常用命令
有19位网友表示赞同!
希望这篇文章也能介绍一些常见的Linux应用软件,比如文本编辑器和终端工具
有13位网友表示赞同!
学习Linux有什么乐趣吗?我想要了解学习Linux的价值
有19位网友表示赞同!
这个清单能否帮助我来解决一些简单Linux系统故障?
有14位网友表示赞同!
有没有人可以分享一些学习Linux的小技巧或经验呢?
有13位网友表示赞同!