If Linux shuts down, but the computer stays in terminal, I can still print the sysRq help, but no longer enter commands.  Is there any way to escape that and undo shutdown while circumventing the Linux death sin, called reb***ing?
122207
Assuming you've just entered the command shutdown -h now (or something equivalent), is there realistically anything you can do (if you're quick enough) to prevent the machine shutting down?
32475
If I'm logged into a remote Linux machine, I know I can suspend a process (cntr-z) and move it to the background (bg 1) but if I disconnect from the machine, the process stops.  Is there a way I can leave it in the background and have it there when I log back in? This is a very long running process.  On Ubuntu, logged in via SSH.
13892
The following message appears almost every time I shutdown my computer:  A stop job is running for Session c2 of user ... (1min 30s)   It waits for 1min30s then continues the shutdown process. I follow  and get the  (I can't paste directly the log here because it's very long). Unfortunately, I don't understand the log by myself. Could anyone help me to find out what makes my system doesn't shutdown properly?  I run Arch Linux with kernel 4.4.5-1-ARCH, my systemd version is 229-3.  Addition 1: I observe that every time I logout, and then shutdown my computer from the login screen, it doesn't get the message A stop job is running.... I tried to logout before shutdown for many times, so I think it doesn't occur by chance. Hope that information could help.  Addition 2: It is always session c2 that causes shutdown hanging. So as @n.st suggest, I looked at  again and stored loginctl session-status c2 instead of dmesg, but then there is nothing on the shutdown-log.txt. I replaced loginctl session-status c2 by systemd-cgls and got the following log:  Control group /: -.slice └─init.scope   ├─   1 /usr/lib/systemd/systemd-shutdown reboot --log-level 6 --log-target ...   ├─1069 /usr/lib/systemd/systemd-shutdown reboot --log-level 6 --log-target ...   ├─1071 /bin/sh /usr/lib/systemd/system-shutdown/debug.sh reboot   └─1074 systemd-cgls   Any ideas?  Note: After I updated to kernel 4.6.4-1-ARCH and systemd 230-7, the error no longer happened.
123360
Sometimes you run a program from the terminal, say, lxpanel&dagger;. The terminal won't drop you back to the prompt, it'll hang. You can press Ctrl+C to get back to the prompt, but that will kill lxpanel. However, pressing Alt+F2 (which pops up a window to take a command) and running lxpanel works gracefully.  Why is this? What is different between running a command from the terminal and from the 'run' window that appears when you press Alt+F2?  &dagger; lxpanel here was just used as an example. I have experienced this with multiple programs
82412
Yesterday I tried turning on my computer. It led me into this grub menu and I have no idea how to get out. I can't use my computer anymore due to this. What should I do? Do I type in a command or something?
49352
I have desktop edition of Ubuntu.  I like the Terminal so that that I prefer to shutdown my computer with the shutdown command.  However when I type shutdown now it prompts me to enter my password.Is there any way I can shutdown my computer using this command without entering my password?
97275
I define a shell keybinding in my ~/.bashrc like so:  bind -x '"\e\C-w":"/usr/bin/reset"'   This does make Ctrl-Alt-w launch the reset executable. However, it leaves the terminal in a state that resembles the one you get into by pressing Ctrl-v. So, for example, if immediately after resetting in this way I press Ctrl-p, instead of invoking the action of that shortcut (repeat previous command) I get ^P printed.  Any idea what's causing this problem and how to fix it?  EDIT: I am attaching a Python program that reproduces the messed-up terminal state I am trying to fix with the reset. I encounter this condition very often while debugging multi-threaded applications:  import pdb, thread, time  def interrupt():     time.sleep(2)     pdb.set_trace()  thread.start_new_thread(interrupt, ()) raw_input('? ')   To reproduce the messed-up state, just run the code above, and press Enter when you see the debugger invoked (it will print a bunch of text, ending with pdb.set_trace(), about two seconds after you run the program and the initial prompt appears).
2844
I'm working on a Linux machine through SSH (Putty). I need to leave a process running during the night, so I thought I could do that by starting the process in background (with an ampersand at the end of the command) and redirecting stdout to a file.  To my surprise, that doesn't work. As soon as I close the Putty window, the process is stopped.  How can I prevent that from happening??
69204
I have looked all over the Internet trying to find a fix, but I can't seem to find one. I have a custom built PC running an AMD processor, Nvidia graphics, 16GB of ram and a 1TB HDD for Ubuntu. I am not trying to dual boot, I just have Ubuntu 13.04 on the hard drive nothing else.  Every time I press 'Shutdown' or 'Restart', it goes through its normal shutting down thing; but, after that, there is just a black screen and nothing more. Nothing happens, it's just black. The only way for me to turn off Ubuntu at the moment is to press shutdown, wait for the screen to go dark, and then force shutdown it by pressing the physical shutdown button on the PC.  Could someone please tell me what is wrong and how I can get Ubuntu to work correctly? (Never had this problem when I was dual booting on my old HDD.)  P.S. I am able to log out.  After running Sudo shutdown it gave me an error this is the error:  'Modem-manger[5062]: Could not get the system bus. Make sure the message bus daemon is running! Message: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory modem-manger[5078]:  ModeUbuntu 13.04rsion 0.6.0.0) starting... modem-manger[5078]: Could not get. . . . m bus. Make sure the message [FAIL] e   * Will now switch to single-user modenect to socket /var/run/dbus/system_bus_so root@mauritz-ubuntu:~# irectory'  And then just a ton of OK checking's, To me it seems like much of the text that it is displaying is overlapping on other text, so thats why it seems really weird.  Second error (running sudo shutdown as root): "sudo shutdown now *Disabling power management... [OK] Saned disabled; edit /etc/default/saned Speech-dispatcher disabled; edit /etc/default/speech-dispatcher  * Asking all remaining processes to terminate... [OK]  * Killing all remaining processes... [FAIL]  * Will now switch to singel-user mode"
44061
When running 'screen ls' the screen stops with the text [screen is terminating]. I would like screen to keep the session alive and reattach to it to see the output of ls.  Of course the real thing is that I don't run screen ls, but rather a screen fsck ..., so I would like to ensure that the screen is not terminating when this command is finished.  I would love to have an answer that is useful for an already existing running screen session, so some interactive keys like C-a ... or C-a : (Enter command line mode)
59727
A few days ago, I accidentally replaced my desktop in Mint 18 with a virtual console with an errant keystroke.  Not having an obvious way to reverse the changes, I logged in and typed exit to exit the console and go back to the desktop.  Instead, the computer rebooted, and I lost God-only-knows-how-much unsaved work.   After showing the Mint logo and flashing a message underneath it far too quickly to read, the computer now boots only to a black screen.  By pressing esc during reboot, I can get to a Startup Menu.  I ran disk checks and memory checks using it, and they all came up clean.  None of the other options in this menu help.  I have no idea what to do.  The screen is clearly receiving power, and the black screen that it boots to shows a dash or underscore in the top right corner.  How do I get my computer back?  It's an HP Pavilion laptop.
14348
It's a situation that has happened quite often to me: after I press (with a different intention) Ctrl-S in a terminal, the interaction (input or output) with it is frozen. It's probably a kind of "scroll lock" or whatever.  How do I unfreeze the terminal after this?  (This time, I have been working with apt-shell inside a bash inside urxvt--not sure which of them is responsible for the special handling of Ctrl-S: I was searching the history of commands backwards with C-r, as usual for readline, but then I wanted to go "back" forwards through the history with the usual--at least in Emacs--C-s (, , ), but that caused the terminal to freeze. Well, scrolling/paging to view past things still works in the terminal, but no interaction with the processes run there.)
31776
In sh (not Bash), how would we abort execution of command when the prompt is in &gt; mode?  For example, when entering a string with quotes only at the beginning, it makes the prompt look like &gt;, without the ability to quit it normally, unless hitting Ctrl + D. Example:  root@MyPC:~# echo "hello &gt; I am &gt; (How do I exit of this mode?)   In case that I don't know which character delimits the string (" or ' or simply escaping a newline/spaces with backslash), is there a way to let Bash know that I want to abort the execution of the current command?
30397
One thing that annoys me using Linux's terminal is when I have to type a invisble password, like when you run ssh. Sometimes I mistype one or more letters and then I have to press backspace key a few times to make sure that I erased everything to start again.   I know this is not a big deal but since on the other day I found out that pressing CTRL+L "clears" the terminal I was wondering if there's a way to clear/erase the invisible password without relying on backspace or pressing enter key to try again.
93332
I regularly ssh to a centos 5 box. Somehow they keys are mapped so that control+d will log me out of my current shell. If I am sudo'ed to another use it puts me back to the previous user. If I am not sudo'ed it just disconnects me. How can I keep this from happening? I regularly use control+d to cancel out of the python interpreter and sometimes I accidentally press it more than once.
91441
I am typing a command, I remember I have to check something, if I press Ctrl+U the command disappears and I can type something else, but then the command I was typing is not in the history.  Is there a way to recover that command, or a different shortcut that I can press to save somewhere the command?
83812
I stupidly ran sudo rm /* followed by sudo rm -R /*  My sites still run, although the vast majority of commands like ls are now broken.  Is there a simple way to get data off the server or reverse some of damage?