linux终端执行命令 linux终端常用命令( 六 )


;
linux下退出终端,让PHP程序继续执行的命令1:在终端中执行PHPlinux终端执行命令的命令为linux终端执行命令:
$php test.php
2.如果想使用control+c不终止php文件的执行的话使用命令:
$php test.php
3.如果想退出终端以后php文件继续执行的话使用命令:
$nohup php test.php
4.终止线程运行
$kill -9 线程id
在linux终端执行命令ps-linit的屏幕输出结果是ps(全称:process status)命令是用来查看linux系统进程使用情况,作用相当于windows的任务管理器 。
说明:
ps支持多种系统,如linux,UNIX等,因此可使用的参数选项比较多,但一般我们只需掌握常用的参数即可,此处我们只介绍ps命令不带参数时的输出列表示的具体含义 。
兼容格式:
UNIX格式:以-开头 。
BSD格式:没有以-开头 。
GNU长格式:两个-开头,即-- 。
ps命令不接任何参数
默认情况下,ps不带任何参数时,输出的是使用者当前所在终端的进程,其输出结果如图所示:
linux终端命令的使用shutdown
功能说明:系统关机命令
语法:shutdown [-t sec] [-arkhncfFHP] time [warning-message]
包名称:SysVinit
相关命令:halt,reboot
补充说明:本命令可以关闭所有的程序,并依用户的需要,进行重新开机或关机的操作 。Shutdown命令可以指定系统在特定时间关机,但仅限于当日 。若需指定在特定日期关机,则需搭配at命令执行 。
参数:
-a
Use /etc/shutdown.allow.
-t sec
Tell init(8) to wait sec seconds between sending processes the warning and the kill signal, before changing to another runlevel.
-k
Don't really shutdown; only send the warning messages to everybody.
-r
Reboot after shutdown.
-h
Halt or poweroff after shutdown.
-H
Halt action is to halt or drop into boot monitor on systems that support it.
-P
Halt action is to turn off the power.
-n
[DEPRECATED] Don't call init(8) to do the shutdown but do it ourself. The use of this option is discouraged, and its results are not always what you'd expect.
-f
Skip fsck on reboot.
-F
Force fsck on reboot.
-c
Cancel an already running shutdown. With this option it is of course not possible to give the time argument, but you can enter a explanatory message on the command line that will be sent to all users.
time
When to shutdown.
warning-message
Message to send to all users.
范例:
1)立即关闭系统:
# shutdown -h now
2)执定在21:10将系统重新开机:
# shutdown -r 21:10
3)指定10分钟后关机,并发送警告信息:
# shutdown +10 “conputer will shut down”
4)取消关机:
# shutdown -c
2 Linux终端命令职场中,大部分都是通过 SSH客户端 远程操作,实现磁盘读?。?文件读?。?目录操作,进程管理等等
打开终端3种方式,收藏夹黑色屏幕图标点击,右键打开终端 , Ctrl+Alt+t组合键
command[-options] [parameters]
command即终端命令 , options为选项一般前面有横杠,后面是参数,选项和参数有中括号表示可选项
man command (man表示手册缩写,查看命令帮助文档)出现文档,按回车下滚一行,按空格(或f)下翻一页,按b上翻一页 , 输入横杠加上对应的option可实现对应部分高亮
command --help也可以实现帮助文档,页面和上面不太一样,部分还出现了中文
pwd 命令 显示当前路径
tree [path] 命令(默认没有,需要安装,sudo apt install tree)可以将你当前(或指定)路径下的文件以树状遍历(所有文件,递归)显示出来

推荐阅读