FrankKai / FrankKai.github.io

FE blog
https://frankkai.github.io/
363 stars 39 forks source link

一些Linux知识点 #116

Open FrankKai opened 5 years ago

FrankKai commented 5 years ago

也可以叫操作系统知识点。

FrankKai commented 5 years ago

Controlling Terminal

起源于学习ps -ef,-e参数等同于-A,-A,Display information about other users' processes, including those without controlling terminals.

FrankKai commented 5 years ago

recent CPU usage与elapsed CPU usage

起源于学习ps -ef, -f,Display the uid, pid, parent pid, recent CPU usage, process start time, controlling tty, elapsed CPU usage, and the associated command.

501 27289     1   0 五09上午 ??       116:35.74 /Applications/WebStorm.app/Contents/MacOS/webstorm
501 72045 71609   0 10:39上午 ttys003    0:00.00 grep webstorm

elapsed CPU usage 为116:35.74, 0:00.00。

FrankKai commented 5 years ago

kill 与 kill -9之间的区别是什么?

起源于学习kill -9,-9这个参数的描述信息是:non-catchable, non-ignorable kill。

non-catchable, non-ignorable的区别是什么?

kill -9暴力杀进程,不会缓存,不会被忽略,不care进程状态。

FrankKai commented 4 years ago

bash是什么东西?

前置知识

之前用windows系统时,会用到git的bash。 自定义的环境变量,会保存在.bash_profile中。 docker中运行ubuntu镜像时,会在最后指定一个bash:docker run -t -i ubuntu bash

bash是什么东西?

man bash bash - GNU Bourne-Again SHell

Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a file. Bash also incor-porates useful features from the Korn and C shells (ksh and csh).Bash is intended to be a conformant implementation of the Shell and Utilities portion of the IEEE POSIX specification (IEEE Standard 1003.1). Bash can be configured to be POSIX-conformant by default.

  • Bash是一个sh-compatible的命令语言解释器
  • Bash可以通过标准输入或者文件读取到命令。
  • Bash同样包含了Korn(ksh)和C shell(csh)的有用特性。
  • Bash目的成为IEEE POSIX规范的Shell和实用程序部分的一致实现。
  • 默认情况下的Bash是posix一致的。

GNU是什么?

GNU is a recursive acronym for "GNU's Not Unix!",[11][14] chosen because GNU's design is Unix-like, but differs from Unix by being free software and containing no Unix code.