#### Linux常用命令: | 编号| 命令代码 | 命令作用 | |:-:| :-------- | :-----: | | | | ####常用命令#### | |1| cd /home | 进入 '/ home' 目录'| |2| cd .. | 返回上一级目录 | |3| pwd | 显示工作路径 | |4| ls | 查看目录中的文件 | |5| ls -F | 查看目录中的文件 | |6| ls -l | 显示文件和目录的详细资料 | |7| tree | 显示文件和目录由根目录开始的树形结构 | |8| rm -f file1 | 删除一个叫做 'file1' 的文件 | |9| rmdir dir1 | 删除一个叫做 'dir1' 的目录 | |10| rm -rf dir1 | 删除一个叫做 'dir1' 的目录并同时删除其内容 | |11| rm -rf dir1 dir2 | 同时删除两个目录及它们的内容 | |12| cp file1 file2 | 复制一个文件 |13| mv dir1 new_dir | 重命名/移动 一个目录 | |14| find / -name XXX | 查找文件(夹)路径 | | | ####chmod命令添加读写权限### | |1| chmod 777 tmp_file | 给一个文件添加任何用户都可读写以及执行权限 | |2| chmod 777 -R tmp_file | 对一个目录(tmp_DIR)及其子目录所有文件添加权限 | | | chmod -R u+x tmp_file | -R代表递归,777或者u+x代表附加读写权限 | | | | ####利用du -sh查看VPS/服务器硬盘文件占用问题:####| |1| du -sh /* | 遍历VPS所有的文件,查看VPS中所有目录内的容量 | |2| du -sh /usr/* | 查看某个目录的大小占用,查看USR文件目录中的内部文件夹的内容大小 | | | |#### nginx 启动命令 #### | |1| systemctl start nginx |启动| |2| systemctl restart nginx |重启| |3| systemctl stop nginx |关闭| --- ### 表格(table) --- | 第一列 | 第二列 | 第三列 | | -------- | -----: | :----: | | 第一行 | 右对齐 | 居中 | | 第二行 | 对齐 | 居中 | | 第三行 | 齐 | 居中 | --- #### Editor.md directory editor.md/ lib/ css/ scss/ tests/ fonts/ images/ plugins/ examples/ languages/ editormd.js ... #### 代码块 ``` type 代码段落 ``` 执行命令:`npm install marked` ------------ 下载脚本 wget -N git.io/aria2.sh && chmod +x aria2.sh 运行脚本 ./aria2.sh 启动:/etc/init.d/aria2 start | service aria2 start 停止:/etc/init.d/aria2 stop | service aria2 stop 重启:/etc/init.d/aria2 restart | service aria2 restart 查看状态:/etc/init.d/aria2 status | service aria2 status 配置文件路径:/root/.aria2c/aria2.conf (配置文件有中文注释,若语言设置有问题会导致中文乱码) 默认下载目录:/root/downloads RPC 密钥:随机生成,可使用选项7. 修改 配置文件自定义