Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 Ubuntu 的新手 :) 现在通过使用终端我在特定位置,我想运行在另一个位置找到的 python 文件?在当前位置运行此文件的正确命令是什么?提前致谢
使用完整的文件路径,只需:
python /home/user/this/is/an/example/main.py
如果您不确定文件在哪里,请在其位置打开一个终端窗口并输入pwd,这将为您提供当前目录
pwd