linux后台启动命令

后台启动:nohup bin/hive --service metastore >> logs/metastore.log 2>&1 &
Linux shell中2>&1的含义解释 (全网最全,看完就懂)
Shell 输入/输出重定向
nohup:

  1. nohup stands for “no hang up”. It allows a command to continue running even after the user who issued the command logs out or closes the terminal.
    When a command is prefixed with nohup, it ensures that the command is immune to hangups (i.e., disconnections from the controlling terminal).
    &:

  2. The & (ampersand) operator is used to run a command in the background. It allows the user to continue using the terminal while the command is running.
    When a command is followed by &, it runs asynchronously in the background, and the user can continue issuing other commands in the same terminal session.

  • nohup ensures that a command keeps running even after the terminal is closed, while & runs a command in the background, allowing the user to continue using the terminal for other tasks. However, without nohup, background processes started with & will terminate if the terminal is closed.

相关推荐

  1. linux后台启动命令

    2024-03-11 10:36:03       52 阅读
  2. Liunx启动oracle 、redis命令

    2024-03-11 10:36:03       25 阅读
  3. centos6后台启动docker

    2024-03-11 10:36:03       54 阅读
  4. Android11 后台启动Activity

    2024-03-11 10:36:03       32 阅读
  5. linux让前台正在执行的命令转入后台并nohup的方法

    2024-03-11 10:36:03       47 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-11 10:36:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-11 10:36:03       100 阅读
  3. 在Django里面运行非项目文件

    2024-03-11 10:36:03       82 阅读
  4. Python语言-面向对象

    2024-03-11 10:36:03       91 阅读

热门阅读

  1. npm run dev(pnpm run dev) 的过程都做了什么?

    2024-03-11 10:36:03       43 阅读
  2. c语言:倒序4位数

    2024-03-11 10:36:03       40 阅读
  3. 【Docker】Neo4j 容器化部署

    2024-03-11 10:36:03       49 阅读
  4. 机器学习的要素及步骤

    2024-03-11 10:36:03       41 阅读
  5. 【Linux的网络编程】

    2024-03-11 10:36:03       41 阅读
  6. leetcode 第388场周赛第二题

    2024-03-11 10:36:03       44 阅读
  7. 【二分算法】借教室

    2024-03-11 10:36:03       42 阅读
  8. 【C/C++ 学习笔记】指针

    2024-03-11 10:36:03       48 阅读
  9. 为什么传奇服务器经常被攻击?

    2024-03-11 10:36:03       36 阅读
  10. AcWing 1227. 分巧克力

    2024-03-11 10:36:03       40 阅读