Alt-Tab for Linux command line? [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I am wondering if such a thing exists to where I could run a Java program remotely through SSH on my VPS and then Alt + Tab so that I can run other things in the command line without having to reconnect in a separate tab. I've tried looking through the Java options in the manual, but I couldn't find anything insightful.

In Linux/Unix kind system there is a utility called nohup. You can invoke any command or process using nohup; it will make your terminal free after execution. Linux/Unix systems also support background jobs by appending the character & at end of your command.
So if your Java process is as follows,
java <your program>
you can run it as follows:
nohup java <your program> &
This modified command frees your terminal and you can run another command as per your need.

Related

I want to read how much does my program uses resources in unix but cant [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I have program that I need to run and then see how much resources it uses in unix by using top command. But I don't know how to do it because if i run it from command line I cant use top command till program is finished and vice versa. How can I do it. I tried doing:
sleep 10s
top
./myProgram
But its not working
Open two terminals; run your program in one terminal and top in another.
If you're in a graphical environment, you can just start the terminal a second time.
If you're on the text-only console, you can switch between terminals using Ctrl-Alt-F1..F6 (possibly more) or Alt-Left/Right.
If you connect via SSH, just open multiple terminal sessions in your SSH client.
(Also, I'd hint to use htop instead of top, but you may need to install it first.)
In case your program is too short-lived to show up on top/htop, you might need to run it using Valgrind.
Open two terminals one for running top, and run your program in the other.

Terminal output to a file using > [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I'm a beginner with bash/linux. I have a program that I have written using Visual Code Studio. I have been able to correctly compile the program and it return the output I was expecting. But I have forgotten the command to take that output and put it into a specific file.
Also, how would I find the pathway for that file, if it's not physically on my computer? I've ssh into a rasp pi on campus. So all the files are on the pi. Could it be as simple as copy paste?
I really think you should go over the basics of remote connection to a Linux machine, but to answer your question:
In order to redirect output from a command line utility (i.e. your program):
./[program_name] &> [output file]
using the &> operator will redirect both stdout and stderr to that file which I assume you want
In order to pull that file from remote:
scp [username]#[server_ip]:/[output file] ./
This assumes you actually have a user on that remote machine that you can ssh into

How to log terminal keystrokes in ubuntu [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I want to log whatever is happening in my terminal in a text file . I want to save all session information in the log file. We can do this in putty. But I dont know how to achieve the same in simple terminal in ubuntu. Also, is it possible to use putty to open a terminal for localhost? I tried doing that . But does not work.
You can record your terminal session (assuming you're using Bash) by doing script.
You probably want script -k which records input and output.
So in all, doing something like script -k logfilename you will get what you want!

bash terminal on kubuntu [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have noticed that on my Kubuntu installation, the terminal is Konsole. How do I set it to use bash instead?
You are actually using a bash terminal. Konsole is a kind of emulator. I am quoting an answer from unix stack exchange site, when you can find more info about the type of shell you are using.
/etc/passwd defines the default shell for the user, of which bash is just the most common option. Alternatives to bash are zsh, ksh, csh etc. You can google each of them to find out more about them. The default shell is the program that will be run inside of Konsole, which essentially can work with any shell or terminal program for that matter.
(P.S /bin/sh is bash (Bourne Again SHell) terminal.)

Debian does not load X [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have a (little?) problem on my Debian.
When it boots, the X does not load automaticlly.
I need to log on the terminal (in any tty) and after run the command startx.
After run this command, everything works.
So, I think that I just need to configure anything to make the Debian run this command.
Debian has a script for that. To make X start on boot, execute (as root or with sudo):
update-rc.d xdm defaults
For more info, read it's manpage:
man update-rc.d
If you are using Gnome, you'll probably want to use gdm instead of xdm.
Ensure that your x-server is active in your current init level.
Have a look at your /etc/inittab for your default runlevel.
Further you should have something like
x:5:respawn:/usr/sbin/gdm -nodaemon

Resources