linux shell 当前路径$
时间: 2023-08-17 07:06:30 浏览: 94
回答: 在Linux shell中,可以使用命令`pwd`来获取当前路径。\[1\] 当用户执行一条Linux命令又没有指定该命令或参数所在的目录时,Linux系统会首先在当前目录(即当前工作目录)搜寻这个命令或它的参数。因此,为了确定当前工作目录,用户常常需要使用`pwd`命令来获取当前路径。\[3\]
#### 引用[.reference_title]
- *1* [Linux Shell脚本获取当前路径](https://blog.csdn.net/qq_36412715/article/details/83146918)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [linux shell获取当前执行路径](https://blog.csdn.net/bailangriver/article/details/122462381)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [linux查看当前路径命令](https://blog.csdn.net/m0_67391907/article/details/123654223)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文