1. get start

Command Example Description
ls 

ls

ls -a

ls -l

输出目录文件

输出文件包括隐藏文件

输出文件详细信息

pwd    

pwd

show present working dir

cd

cd dir

cd ..

cd ./a/b

cd ~icey/a

cd /home/username/documents

change dir

返回上一个目录

到当前目录下的a/b文件夹中

到某个用户的子文件夹

从根目录开始

mkdir mkdir icey 创建文件夹  
rmdir rm emptydir 删除一个空的文件夹
rm

rm file.txt

rm *.tmp

-f

-i

-r

-v

rm -rf dir

删除一个文件

删除后缀为..的文件

强制删除

交互式删除

递归删除

详细显示

删除文件夹

cp

cp file1 dir

cp file1 file1copy

 
mv

mv oldfilename newfilename

mv filename dir

重命名文件

移动文件到文件夹

more more file 查看文件
lpr lpr file 打印:send file to printer
man man ls   帮助:online help about cmd
cls cls 清屏 clear screen

查看日期:date

安装软件  sudo apt-get install softwareName

解压缩   tar -cf abc.tar subdir

      tar -xvf subdir.tar

2. viewing files

cat filename    Dump a file to the screen in ascii.

more filename   Progressively dump a file to the screen: ENTER = one line down SPACEBAR = page down q=quit

less filename     Like more, but you can use Page-Up too. Not on all systems.

vi filename      Edit a file using the vi editor. All UNIX systems will have vi in some form.

emacs filename  Edit a file using the emacs editor. Not all systems will have emacs.

head filename    Show the first few lines of a file.

head -n filename  Show the first n lines of a file.

tail filename     Show the last few lines of a file.

tail -n filename   Show the last n lines of a file.

2. log on/log off

注销用户 logoff

    exit
重启 shutdown -r /t 000
关闭 shutdown -p

字符终端------图形界面  Character terminal -- graphical interface transform

Character terminal ——> graphical interface

enter: startx

or alt+ctl+space ,release "space", and press F7

graphical interface ——> Character terminal

alt+ctl+F1

3. OS performance

(1)进程

ps    查看进程

kill -9 psid  结束进程

ctl+c  结束当前进程

(2)内存(memory)和CPU

free -m  查看内存使用情况

top    查看内存及cpu使用情况

也可以安装htop工具,这样更直观,
安装命令如下:sudo apt-get install htop
安装完后,直接输入命令:htop
就可以看到内存或cpu的使用情况了。

(3)user

who     --list who is logged on machine

finger  --list who is on compter in the lab

unix basic command的更多相关文章

  1. Linux/UNIX 下 “command not found” 原因分析及解决

    在使用 Linux/UNIX 时,会经常遇到 "command not found" 的错误,就如提示的信息,Linux /UNIX 没有找到该命令.原因无外乎你命令拼写错误或 L ...

  2. linux shell basic command

    Learning basic Linux commands Command Description $ ls This command is used to check the contents of ...

  3. Basic command and advice for memcached

    Storage Commands set Most common command. Store this data, possibly overwriting any existing data. N ...

  4. Raspberry Pi 3 Basic Command and Information

    default username : pi default password : raspberry enter system setting interface : sudo raspi-confi ...

  5. pvresize - Unix, Linux Command

    NAME pvresize - resize a disk or partition in use by LVM2 SYNOPSIS pvresize [-d|--debug] [-h|--help] ...

  6. Unix/Linux Command Reference

  7. UNIX command Questions Answers asked in Interview

    UNIX or Linux operating system has become default Server operating system and for whichever programm ...

  8. Linux--Introduction and Basic commands(Part one)

    Welcome to Linux world! Introduction and Basic commands--Part one J.C 2018.3.11 Chapter 1 What Is Li ...

  9. 50个最常用的UNIX/Linux命令

    转自http://get.jobdeer.com/493.get 1. tar command examples Create a new tar archive. $ tar cvf archive ...

随机推荐

  1. linux rpm -ivh MySQL-server-5.5.31-2.el6.i686.rpm

    linux rpm 安装mysql异常: [root@localhost upload]# rpm -ivh MySQL-server-5.5.31-2.el6.i686.rpmerror: Fail ...

  2. 20145224&20145238 《信息安全系统设计基础》 第三次实验

    20145224&20145238 <信息安全系统设计基础>第三次实验 课程:信息安全系统设计基础 班级:1452 姓名:陈颢文 荆玉茗 学号:20145224 20145238 ...

  3. nexus离线安装索引及一些问题

    安装私服~~~ 整体流程: 服务器安装私服 配置私服(主要是安装索引) 本地maven配置指向私服 安装私服 win & linux 网上教程很多,不在阐述: 配置私服(及安装index) 1 ...

  4. 安装Nvidia k80驱动步骤

    安装Nvidia k80驱动步骤 ------------------ 环境介绍: CentOS6 远程终端使用Xshell -------------------- 安装Nvidia k80驱动步骤 ...

  5. form表单转Json提交方法

    先将表单数值转换成数组存储,存储成的格式为[{"name":"","value":""},.....}] var for ...

  6. 自己写的一个SqlHelper,感觉使用起来挺方便的

    自己写的一个SqlHelper,感觉使用起来挺方便的 using System; using System.Data; using System.Collections.Generic; using ...

  7. java根据标点英文分词

    最近学习java字符串部分,用正则表达式做了一个简单的统计单词出现次数的小程序,目前只能统计英文. 整个程序包括三个包,分别为output,run,wordcount wordCount包 执行单词统 ...

  8. CSS设置DIV背景色渐变

    div{ width: 200px; height: 200px; FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=, ...

  9. jquery 格式化日期

    function setMaxEndDate(){ var beginDate=$("#beginDate").val(); var time = new Date(beginDa ...

  10. vb.net 网络图片

    https://msdn.microsoft.com/zh-cn/library/ms251715(VS.80).aspx