ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
[TOC] ## 常用命令 ### 系统安全 `sudo、su、 chmod、setfac` ### 进程管理 `w、top、ps、kill、 pkill,、 pstree、 killall` ### 用户管理 `id、 usermod、 useradd、 groupadd、 userdel` ### 文件系统 `mount、 umount、fsck、df、du` ### 网络应用 `curl、 telnet、mail、 elinks` ### 网络测试 `ping、 netstat、host` ### 网络配置 `hostname、 ifconfig` ### 软件包管理 `yum、rpm、apt-get` ### 文件内容查看 `head、tail、less、more` ### 文件处理 `touch、 unlink、 rename、ln、cat` ### 目录操作 `cd、mv、rm、pwd、tree、cp、ls` ### 文件权限属性 `setfac、 chmod、 chown、 chgrp` ### 文件传输 `ftp、scp` ### 定时任务 ### crontab命令 `crontab -e` `* * * * * 命令(分时日月周)` ### at命令 一次性执行命令 ``` at 2: 00 tomorrow at>/home/Jason/do job at> Ctrl+D ``` ## shell 命令 ### 脚本执行方式 1. 赋予权限,直接执行, ` chmod+ x test.sh;/test.sh` 2. 调用解释器使得脚本执行, `bash、csh、csh、ash、bsh、ksh等等` ### 编写基础 开头用#!指定脚本解释器 `#!/bin/sh`