unix系统简明教程 命令

who                                 显示电脑用户信息

liu :0 Oct 6 13:17 (:0)
liu pts/2 Oct 6 13:22 (:0)

who am i                           显示自己的信息

liu pts/2 Oct 6 13:22 (:0)

man  帮助手册

echo $SHELL                显示SHELL的值

/bin/bash

exit                                  注销

ls                                  显示该目录下的  文件

passwd                                       用户密码更改
Changing password for liu.            //unix提示
(current) UNIX password:               //输入当前密码
Enter new UNIX password:                        //输入新密码
Retype new UNIX password:                         //再次输入新密码
passwd: password updated successfully                 //unix提示   密码更新成功

date                   显示当前系统时间
Fri Oct 6 14:12:18 CST 2017


 cal 9 2017      显示你选择的月份的日历
September 2017
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

 logname      显示在线用户名
liu

 banner WHY  显示用ASCII码表示why   如果系统没有显示  请输入

sudo apt-get install sysvbanner   

history           显示用户输入的历史 命令
1 sudo apt-get install language-pack-zh
2 sudo apt-get install -f

 !8             !n   执行你输入的历史命令中的第n条命令
ls
Desktop Downloads Pictures Templates examples.desktop hahaha
Documents Music Public Videos gec

alias dir ls      定制自己的命令     alias  自己定制的命令名字   命令   以后输入dir   就相当于ls

dir
Desktop Downloads Pictures Templates examples.desktop hahaha
Documents Music Public Videos gec

ls
Desktop Downloads Pictures Templates examples.desktop hahaha
Documents Music Public Videos gec

who am i;who             ; 命令行的连接   系统会依次执行
liu pts/2 Oct 6 14:08 (:0) 
liu :0 Oct 6 13:17 (:0)
liu pts/2 Oct 6 14:08 (:0)

who | wc -l   //生成用户清单 然后统计行数   | 表示把前面的输出作为后面的输入
2

ls -aR    列出当前目录之下的   所以目录以及其内容

file   .login   检查自己unix目录文件中.login的文件类型

ls -alh                    列出所有文件的详细清单  
total 136K
drwxr-xr-x 19 liu liu 4.0K Oct 6 13:17 .
drwxr-xr-x 3 root root 4.0K Dec 25 2016 ..
-rw------- 1 liu liu 4.1K Oct 6 13:17 .ICEauthority
-rw------- 1 liu liu 51 Oct 6 13:17 .Xauthority
-rw------- 1 liu liu 2.0K Oct 6 14:07 .bash_history
-rw-r--r-- 1 liu liu 220 Dec 25 2016 .bash_logout
-rw-r--r-- 1 liu liu 3.6K Dec 25 2016 .bashrc

pico   打开pico文本编辑器   

原文地址:https://www.cnblogs.com/52why/p/7631530.html