linux - 如何设置在linux中执行哪个二进制文件
问题描述
我的机器中有 2 个名为“jupyter-notebook”的二进制文件:
$ which jupyter-notebook
我得到结果:
jupyter-notebook is /usr/local/bin/jupyter-notebook
jupyter-notebook is /anaconda3/bin/jupyter-notebook
似乎当我键入$ jupyter-notebook
它会自动运行第一个。如何配置它以运行第二个?
解决方案
您可以为此使用别名。在您的 shell 中运行以下命令。
别名 jupyter-notebook="/anaconda3/bin/jupyter-notebook"
如果你希望它是永久的,那么把它放在你的 shell rc 文件中。
推荐阅读
- http - 当 Timing-Allow-Origin 设置为 * 时,拒绝获取不安全的标头“Server-Timing”?
- sql-import-wizard - 问题设置源数据列使用 sql 导入数据向导导入 txt 文件
- java - Student 类有一个静态方法 getAllStudents() 有意义吗?
- python - 我正在尝试从文件中提取序列,但出现以下错误
- java - 获取同一行中的整数和字符
- java - Executor FixedThreadPool 执行后会发生什么,因为 executor 没有关闭方法?
- python - 在 Google Coral 开发板上使用 OpenCL 和 OpenCV 的工作组大小错误
- c# - 计算列表中数字之间的差异
- java - Java 中的 HeapDump 和内存泄漏
- java - 如何使用 BlockingQueue 解决容量为 1 的生产消费者问题?