Whenever I want to open a editor from the terminal i write   gedit filename.sh   But in this case i cannot write again in the terminal until and unless I close the editor first.  But whenever I use the command  gedit filename.sh &amp;   It returns a value, like this    and i get my control back over the terminal without closing the editor. I learnt this trick from an youtube video but that guy didnt mentioned why this occurs and what is the number that is being returned. I am a newbie in linux, so this question may be silly to some pros, but still its my doubt and I will be highly obliged if you kindly help me in this. Thank you.
16261
How do I run a program in the background of a shell, with the ability to close the shell while leaving the program running? Lets say my UI is having problems or for some reason, I need to boot up a program from the terminal window, say, nm-applet:  nm-applet   When it's started, it occupies the foreground of the terminal window.  Is there any simple way to run the program in the background without needing to leave the terminal open or have it occupy the whole terminal?  On that note, I did find a way to run programs from the terminal and have it allow for other inputs, by appending an ampersand (&amp;) to the command as such:  nm-applet &amp;   But this isn't much use as any processes started in the terminal are killed once the terminal is closed.
4149
Whenever I open a .sh file, it opens it in gedit instead of the terminal. I can't find any option similar to Right Click → Open With → Other Application... → Terminal.  How do I open this file in the terminal?
177
What is a terminal? How do I open a terminal window? How do I use the terminal?
47648
I'm using Zsh and some CLI's such as Google's gcloud load files via $EDITOR.    For me, I have set this as:  export EDITOR="/usr/local/bin/mvim"   With aliases for that editor using the -v flag which loads vim in the terminal:   mac_vim="$EDITOR -v"  alias vi=$mac_vim  alias vim=$mac_vim  alias v=$mac_vim   That works but when the gcloud CLI calls $EDITOR it does not have the -v flag so it opens in a new terminal.  I thought I could change that by instead adding the -v flag here:  export EDITOR="/usr/local/bin/mvim -v"   However, when I try and run that on the command line I get:  $EDITOR text.html zsh: no such file or directory: /usr/local/bin/mvim -v   Is it possible to include a flag when exporting my $EDITOR?
65564
Why does Ubuntu create a file ending in ~ for every file I create with a text editor ?   Creating a file with a text editor like GNU Emacs, say myfile, another file called myfile~ is also created. Why is this superfluous file created ? Using cat on it displays nothing.  Thanks,
41932
When ever I save a gedit file in a directory, two copies of it get saved with identical content. Ex: If the gedit file is named as file_name and saved in Home directory then when u ls the Home directory you get file_name and file_name~ in the list. When the file command is run against them I get ASCII text, with very long lines for both of them when I view their contents using the less command they seem to largely contain identical content. The ~ file is a copy of the file when it was saved for the penultimate time. Can someone please help me in understanding as to why such a file (the file with a trailing ~ mark in its name ) is created?
38904
I have an unsaved document opened in gedit on Xubuntu 13.10. A bug caused gedit's main window to disappear and only the title bar is still visible, reading "Untitled Document 1".  Is there a way to recover the typed text from the running but defunct session of gedit? Are "Untitled Documents" stored somewhere temporarily?
106374
In gedit, printing a file gives an option of printing to file where the file can be saved as a pdf. How can I do the same thing from the command line?
6734
While executing a C program, a.out, using the Ubuntu terminal, why do I always need to type ./ before a.out, instead of just writing a.out? Is there solution for this?
28777
Using the Nano text editor, I'm trying to save and exit a file.  I already have the file named.  I click Ctrl+X to exit. And then I click Y because I want to save the file. It asks for file to write, I pressed Enter to use the default name because its already named.  The problem is I get this message.   [Error writing /filename: Permission denied]   What am I doing wrong?
13368
Have a look at the code:  #!/bin/bash read -p "Eneter 1 for UID and 2 for LOGNAME" choice if [ $choice -eq 1 ] then         read -p "Enter UID:  " uid         logname=`cat /etc/passwd | grep $uid | cut -f1 -d:` else         read -p "Enter Logname:  " logname fi not=`ps -au$logname | grep -c bash` echo  "The number of terminals opened by $logname are $not"   This code is used to find out the number of terminals opened by a user on the same PC. Now there are two users logged on, say x and y. I am currently logged in as y and there are 3 terminals open in user x. If I execute this code in y using different ways as mentioned above the results are :  $ ./file.sh The number of terminals opened by x are 3  $ bash file.sh The number of terminals opened by x are 5  $ sh file.sh The number of terminals opened by x are 3  $ source file.sh The number of terminals opened by x are 4  $ . ./file.sh The number of terminals opened by x are 4   Note: I passed 1 and uid 1000 to all these executables.  Now can you please explain the differences among all these?
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
27380
I often open lots and lots of Terminals [Right now I have 7 open on this workspace] and I often search history with grep to find a command I've just written recently, but I don't want to hunt down the terminal and then scroll up and hunt for it more, etc.. Sometimes my terminals close without 'exit,' and everything I've written is lost [Sometimes I've needed something I'd written in a terminal that was killed].  So is there a way to make it so each terminal writes to .bash_history immediately? or at least once a minute, or something like that?
122711
Im trying to make a shortcut to login my ssh server:  ssh x.x.x.x   I made the following file:  ssh_home.sh   Made it executable:  sudo chmod +x ./ssh_home   Checked by right clicking properties to check if it was executable and it was..  But whatever I do, when double clicking it, it will launch gedit. I tried "Open With" but no terminal app is shown there. I searched the net but only found a way to link to the file while not integrating it in one "shortcut file"
89748
I am trying to install Java via the terminal using the guide .  Everything went perfectly fine until "Step 11: Save the /etc/profile file and exit":    I spent maybe 30 minutes figuring out what ^ means (apparently Ctrl), but I cannot understand how that guy called the save command where you can choose yes and no.  I did try ^O, but I didn't get the same result as he did. How can I fix this problem?
14309
I have a bash script that has permission to execute, but when I double click it in nautilus it won't execute, instead it opens as text in gedit.   In properties it says open with: gedit, and that doesn't change when I click the reset button.  What do I have to do to make it execute? I'm running Ubuntu 13.04. I never had an issue like this one with 12.04 or with any other distribution in general.  EDIT If I go in terminal and type: ./bashscriptname it runs just fine.
101085
I've recently installed Fedora 19.  is installed. But its own examples don't work. When I enter gedti the output is:  bash: gedti: command not found... Similar command is: 'gedit'   And it works correctly but when I enter powertop, the output is:  bash: powertop: command not found...   With no suggestion about the package. Why? Should I edit some configuration files or update some cache or ... ?