Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I want to ask a question regarding the terminal in ubuntu. When i deleted some lines in the config files for example, there will be those so-called extra spaces left after deleting and i can't seem to delete those spaces and 'pull' up the lines below.
In linux. Hmm, with what application? Just edit it terminal using sudo? x.x
I just open it in terminal. using "sudo vi /usr/local/nagios/etc/objects/windows.cfg"
Right, you don't "edit using sudo", you rather edit using "vi" (or "vim" most likely these days). "sudo" just grants you the necessary rights to edit that file, since it's a system file.
"vi" clones do have two modes, a so called command mode and an edit mode. On edit mode the editor works as default in most of them (as I told you above) in command mode vi attend to special commands and it is unlikely that you will be able to handle that without some previous learning. The problem here is that by default, vi(m) will enter in command mode, so unless you know vi(m) commands you won't be able to do anything with it at all.
I'd suggest you to use nano or anything else instead. I have no idea what editor might be shipped by default on your distro though. You could try nano still, it won't harm:
sudo nano <whatever-file>
Nano is pretty much straightforward to use, in the fashion of traditional text editors as they've been since the DOS age. If you truly want to use vi(m) then google for vim tutorials, there are plenty.
whichever line you want to delete , just position your cursor anywhere on that line (then press escape key , you will hear beep if you are already in command mode)then press 'd' twice & that line disappears while lower one jumps up.
Whenever you are in doubt press escape key to confirm you are in command mode.
You can exit saving changes by pressing :wq or if you don't want to mess that file then :q! & whatever you did will be zero.
Vi editor is great . You will be impressed with its ability once you get hang of its basics.
Also there is command mode , ex mode & insert mode. Usually if you are in insert mode then you see it written on lower left corner.
More on that later , if you want to know ?
Last edited by sumeet inani; 07-28-2010 at 07:50 AM.