-
ls
: Lists files and directories.
- Usage:
ls
, ls -l
(long format), ls -a
(including hidden files)
-
cd
: Changes the current directory.
- Usage:
cd [directory]
, cd ..
(parent directory), cd
(home directory)
-
pwd
: Displays the path of the current working directory.
-
cp
: Copies files and directories.
- Usage:
cp [source] [destination]
, cp -r [source_directory] [destination_directory]
(recursive copy)
-
mv
: Moves or renames files and directories.
- Usage:
mv [source] [destination]
, mv [old_name] [new_name]
-
rm
: Removes files and directories.
- Usage:
rm [file]
, rm -r [directory]
(recursive remove)
-
mkdir
: Creates new directories.
- Usage:
mkdir [directory_name]
-
touch
: Creates a new empty file or updates the timestamp of an existing file.
-
cat
: Concatenates and displays the content of files.
- Usage:
cat [file]
, cat [file1] [file2] > [new_combined_file]
-
grep
: Searches for a specific pattern in files or input.
- Usage:
grep '[pattern]' [file]
, cat [file] | grep '[pattern]'
-
find
: Searches for files and directories based on various criteria.
- Usage:
find [directory] -name '[pattern]'
, find [directory] -type f
(files only)
-
sudo
: Executes commands with superuser privileges.
-
chmod
: Changes the permissions of files or directories.
- Usage:
chmod [permissions] [file]
-
chown
: Changes the owner and group of files or directories.
- Usage:
chown [user]:[group] [file]
-
df
: Displays disk space usage.
- Usage:
df
, df -h
(human-readable format)
-
du
: Displays the disk usage of files and directories.
- Usage:
du
, du -h
(human-readable format)
-
ps
: Shows information about active processes.
-
kill
: Terminates processes.
- Usage:
kill [process_id]
, kill -9 [process_id]
(force kill)
-
nano
, vi
, emacs
: Text editors for editing files.
- Usage:
nano [file]
, vi [file]
, emacs [file]
-
man
: Displays the manual page for other commands.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· DeepSeek在M芯片Mac上本地化部署