命令 | 语法 | 说明 |
---|---|---|
cd | cd [directory] | 进入某个目录下,取Change Directory之意(cd .进入本层目录,cd . . .. ..退回到上一层目录 ) |
ls | ls [options] [pathname-list] | 列出目录下的所有文件及文件夹 |
pwd | pwd | 显示当前目录的全路径(Print Working Directory) |
mkdir | mkdir [options] dirName | 创建名称为 dirName 的子目录 |
rm | rm [options] file/directory | 删除文件或文件夹,加-r参数为删除文件夹 |
cp | cp [options] file1 file2 | 复制file1到file2 |
mv | mv [options] source target | 将一个或多个文件从source位置移动到target位置 |
cat | cat [options] [file-list] | 1,显示file1和file2的内容(cat file1 file2);2,将file1和file2合并成file3(cat file1 file2 > file3) |
less | less [options] [file-list] | 在标准输出上连接、分页显示文件 |
head | head [options] [file-list] | 显示文件的前几行,默认为前10行 |
tail | tail [options] [file-list] | 显示文件的后几行,默认为后10行 |
ln | ln [options] existing-file new-file/ln [options] existing-file-list directory | 1,为“existing-file”创建链接,命名为new-file;2,在directory目录,为existing-file-list”中包含的每个文件创建同名链接 |
chmod | chmod [option] mode file-list | 改变或设置参数file-list中的读、写或执行权限 |
echo | echo $variable | 显示变量variable的值 |
ps | ps [options] | 用于查看当前系统中的活跃进程(ps -aux显示当前所有进程) |
kill | kill [-signal] pid | 终止指定进程 |
linux常用命令
最新推荐文章于 2023-12-13 09:12:09 发布