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. 数据挖掘算法(一)C4.5

    统计了14天的气象数据D(指标包括outlook,temperature,humidity,windy),并已知这些天气是否打球(play).如果给出新一天的气象指标数据:sunny,cool,hig ...

  2. 【Mxnet】----1、使用mxnet训练mnist数据集

    使用自己准备的mnist数据集,将0-9的bmp图像分别放到0-9文件夹下,然后用mxnet训练. 1.制作rec数据集 (1).制作list

  3. Swift函数的定义

    //: Playground - noun: a place where people can play import Cocoa //基本的函数 //************************ ...

  4. A flash of Joy

    import re from datetime import timedelta from tornado import httpclient, gen, ioloop, queues peoples ...

  5. Asp.net有关GridView的使用

    一.带提示语句的删除 二.使用config里面的连接字符串 三.鼠标移到GridView某一行时改变该行的背景色方法 四.两个事件 五.GridView实现自动编号 不难写

  6. 05-String动手动脑问题及课后实验性问题总结

    一.请运行以下实例代码StringPool.java,查看其输出结果.如何解释这样的输出结果?从中你能总结出什么? (1)在Java中,内容相同的字符常量("Hello")只保存一 ...

  7. Win7/Win8/Win8.1/Win10下的DragEnter DragDrop事件不触发

    Win7/Win8/Win8.1/Win10下的DragDrop事件不触发 2011-02-02  来自:博客园  字体大小:[大 中 小] 摘要:你的应用程序需要从windows资源管理器拖动文件到 ...

  8. Jenkins 命令

    Jenkins 服务集群环境的启动命令 #必须在root下启动 sh /home/jenkins/tomcat/bin/startup.sh dubbo服务注册中心 zookeeper启动命令 /we ...

  9. jfinal基本应用 --报主键重复

    在使用jfinal 的Model过程中有一个很怪异的问题,发布到服务器上,只要是往表中添加字段,就报主键重复. 1.我添加表的时候调用了 public void create(Map map){ St ...

  10. ecshop后台新功能及权限的添加

    1.在后台"推荐管理"里添加"推荐人分成"."会员分成"两个操作功能以及权限 index.php?act=menu incluedes/in ...