136

I am trying to install Java via the terminal using the guide How to Install Oracle Java JRE on Ubuntu Linux.

Everything went perfectly fine until "Step 11: Save the /etc/profile file and exit":

Enter image description here

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?

Braiam
  • 67,791
  • 32
  • 179
  • 269
user288690
  • 1,563
  • 3
  • 12
  • 8
  • 2
    Unrelated to your question, but anyway, you have an error in the script in your screenshot. JAVAJAVA_HOME should be just JAVA_HOME. – Tommy Brunn Jun 07 '14 at 09:32

4 Answers4

174

Ctrl + X will quit the editor and you will be asked if you want to save your changes. If you do, press Y for Yes.

Ctrl + O should also work, since that means to save the file, but you won't be asked "Save modifier buffer ? " because you already told nano to save.

MrVaykadji
  • 5,875
  • 2
  • 32
  • 55
Tommy Brunn
  • 9,751
  • i am editing etc/bluetooth/main.conf file. When I do ctrl+X , it shows filename to write and its in var/tmp/mainxxejQnI3.conf? Is this correct behavior? – Murtaza Haji Mar 01 '21 at 13:53
50

One can save changes via Ctrl+O which actually means Write Out while editing a file through nano:

nano

Where ^ means Ctrl.

Note : You'll also have to press Enter to overwrite the existing file if it exists.

YakovL
  • 103
Avinash Raj
  • 78,556
8

With the image shown right now you can save just pressing "Y" for yes. To know what key combinations you need to do just check the White square besides the action, which are as follow:

  • Y: yes
  • N: no
  • Ctrl + C: Cancel
Braiam
  • 67,791
  • 32
  • 179
  • 269
3

I am using CTRL + S to save and CTRL + X to quit.

Nmath
  • 12,333
laksys
  • 143
  • 6