How to open a command terminal in Linux?

后端 未结 8 2153
情歌与酒
情歌与酒 2020-11-30 09:45

I want to open the terminal (command prompt) on a Linux machine using Java code. I know how to open command prompt in windows.The following code i have used in windows

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-30 10:16

    There isn't actually a "the" terminal. What you really want is shell. Most Linuxes uses BaSH as a shell, but to keep on the safe side you should restrict yourself to /bin/sh

    Edit: Hmm I probably missunderstood the question. If you want an interactive terminal you should look into using a toolkit providing a component for that.

    Edit2: Maybe your needs can be served by VTE which is a GTK+ component for embedding a terminal.

提交回复
热议问题