Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ok, I've been using linux on console only PC for a couple days now and one big thing is really bothering me...
How do I exit vi/emacs/joe?! also, how do I save + open files? I know how to stop the process (ctrl + Z) but I doubt thats the best way to exit :-)
This is really bugging me b/c its sooo simple and I've been trying key combos for hours, but I've finally decided to just put my pride aside and ask. So please, anyone, how do I exit?
vi - press escape to get into command mode if you re not already in command mode (if you are, it s OK to press it anyway). :q to quit :w to save, :wq to do both.
Btw, this kind of super-newbie information should maybe be put in man pages? maybe a section of the man dedicated to newbs? Just so that people might have some idea where to start...
this also applies to exiting man pages I figured out too... :-)
For Joe, ^kz will stop the job, not a good thing. Use ^kx to save the file and ^c to cancel the file or any changes. At any time in joe, use ^kh and you'll get a split screen with the commands in the top half. ^[. takes you to the next help page if needed. Use ^kh again to get rid of it. It is very fast.
Emacs is not a good one to start with. I'd get vi or joe down well first.
Distribution: FreeBSD, OBSD maybe Gentoo and Winblech XP
Posts: 291
Rep:
I use vi cause every *N*X has it. The BSD versions are tricky sometimes.
Linux
i or insert to insert text
ii ir insert insert to replace (overwrite)
arrow keys to navigate
esc :q! to exit with out changes
esc :wq to save and exit
my fave
esc shift^ZZ to save and exit.
*BSD
same as above but no arrow keys and sometimes no insert i(only)
esc takes you to command mode and you can navigate
.with keys
x =delete
h,j,k,l = arrows
etc...
just the very basics
Almost forgot that *BSD has an editor ee I like alot when you're done editing
esc and you get a little menu
Help please.
I'm connected to debian through SSH and have vi running with resolv.conf open and close to mashing it up which I don't want to do. Esc :q isn't working. How can I exit without saving mistakes?
Help please.
I'm connected to debian through SSH and have vi running with resolv.conf open and close to mashing it up which I don't want to do. Esc :q isn't working. How can I exit without saving mistakes?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.