Vim for Editing Files in Linux
Sign in to YouTube
Sign in to YouTube
Sign in to YouTube
Uploaded on Jan 26, 2011
Info
Level: Beginner
Presenter: Eli the Computer Guy
Date Created: September 14, 2010
Length of Class: 35 Minutes
Tracks
Linux
Prerequisites
Introduction to Linux
Installing Linux
Basic Linux Tasks
Purpose of Class
This class teaches students how to edit configuration files in Linux using the text editor VIM.
Topics Covered
Starting VIM
Editing Files
Searching in Files
Opening, Saving and Exiting Files
Class Notes
Introduction
No .txt -- no file association
Starting VIM
Sudo vim XXX (opens a file, or creates file)
Sudo -- sometimes you need, sometimes not... if you use it it will always work...
To change ownership of a file (Sometimes needed to edit .ini and configuration files)- Sudo chown user file
Editing and Navigating
a = insert, esc = exit insert
:/ = find (use wildcards)
:/? = Find backward
n = next
Exiting and Saving
:q = quit
:q! = quit no save
:wq = save and quit
:e = open file
:w = save as
Final Thoughts...
Very complicated... Lots of options... these are good enough to start with....
Resources
Vim Website: http://www.vim.org/
Vim Manual: http://vimdoc.sourceforge.net/vimum.html
-
Category
-
License
Standard YouTube License
Loading...
Loading...
Loading...
Loading...
Loading...
-
35:33
Linux Backup with TAR and Cron Jobsby Eli the Computer GuyFeatured
23,824
-
53:18
Basic Linux Tasksby Eli the Computer Guy
68,112 views
-
37:00
Users, Groups and Permissions in Linuxby elithecomputerguy
77,690 views
-
1:14:08
Cleaning an Infected Windows PCby Eli the Computer Guy
119,827 views
-
25:18
Linux Live CDs for Troubleshooting and Hackingby Eli the Computer Guy
24,590 views
-
57:38
Introduction to Networkingby elithecomputerguy
204,910 views
-
36:01
Introduction to RAIDby elithecomputerguy
23,305 views
-
15
videos
Play all
eli linux lessonby Bizhopjoesax
-
1:17:47
How to Become an IT Professionalby elithecomputerguy
86,565 views
-
1:38:23
Introduction to HTML Programmingby Eli the Computer Guy
204,020 views
-
Vim
1,620 videos147
-
52:12
How to Become an IT Consultantby Eli the Computer Guy
33,524 views
-
48:08
Introduction to Linuxby elithecomputerguy
262,503 views
-
1:09:35
TCP/IP and Subnet Maskingby Eli the Computer Guy
254,138 views
-
59:06
Introduction to Website Administrationby elithecomputerguy
52,062 views
-
54:03
Introduction to Telephone Systemsby Eli the Computer Guy
125,494 views
-
58:58
Introduction to Virtualizationby elithecomputerguy
66,075 views
-
23:51
Hacking the Windows Registryby elithecomputerguy
48,255 views
-
51:19
Linux Network Configurationby Eli the Computer Guy
125,101 views
-
32:45
Introduction to Programmingby elithecomputerguy
100,772 views
-
46:09
Hacking DNSby elithecomputerguy
256,231 views
-
1:01:21
Introduction to Voice Over IPby elithecomputerguy
206,294 views
- Loading more suggestions...
Uploader Comments (elithecomputerguy)
Cleber Jose de Rossi 6 months ago
I prefer VI, I think it is easier!But VIM has more features.
Sign in to YouTube
Sign in to YouTube
elithecomputerguy 6 months ago
I've found it's really a personal preference type of thing. I learned VIM first and liked it so that's what I use... VI is good too...
Sign in to YouTube
Sign in to YouTube
Top Comments
rasix86 5 months ago
Holy crap.. some seriously bad suggestions in the 1st 10 minutes already... open all files as sudo? you cant be serious. and even worse: change ownership of files? this can in worst case break your system....
Sign in to YouTube
Sign in to YouTube
All Comments (122)
Paul Pavalone 4 days ago
I've been having an overheating problem with my Ubuntu...i.e. the computer shuts down when it hits it's critical trip point of 106 degrees. I've changed the permissions and ownership of the files correctly but I am still unable to modify or delete the thermal zone trip point files...Any suggestions? And no, I am not concerned about burning out my cpu.
Sign in to YouTube
Sign in to YouTube
Deshinffxi 1 week ago
True but as he said right at the beginning: you won't know what the ownership is until after you've done any edits and want to save the file. It's better to just get used to writing "sudo vim" than "vim" and realising after a massive edit "oh I don't have permission"
You don't NEED to do it but it's erring on the side of caution
Sign in to YouTube
Sign in to YouTube
rasix86 4 weeks ago
I wonder what all those admins out there, that dont have sudo installed, do in such cases... seriously, that statement is plain wrong
Sign in to YouTube
Sign in to YouTube
ideasman42 4 weeks ago
If your editing config files as an admin, you very well may have to use sudo, I think he just misses context while explaining.
Sign in to YouTube
Sign in to YouTube
Vincent Vetsch 1 month ago
Use sudo or su sparingly. Use it based on the file ownership.
Sign in to YouTube
Sign in to YouTube
TheKarabouzouklis 1 month ago
he said you can't edit all files if you don't use sudo which is true
Sign in to YouTube
Sign in to YouTube
Ricardo Band 1 month ago
These videos aren't great. He teaches wrong and very insecure things. People shouldn't listen to him and he should stop doing this crap or try learning how things are right before telling wrong stuff.
Sign in to YouTube
Sign in to YouTube
Ricardo Band 1 month ago
This comment has received too many negative votes show
5:20 Always use sudo? Hell, no!
6:35 Case by case? What about file permissions?
8:35 Change ownerchip of files? He can't be serious?
9:45 Don't learn security? Sure, it's better to learn everything wrong and then right again..
10:40 123456 is not a good password.
20:15 Stupidly long configuration files? Long is good, more options, more examples and documentation.
33:45 Why does he talk bad about linux all the time?
35:05 Word for making books? Never heard of some called LaTeX?
Eli you suck.
Sign in to YouTube
Sign in to YouTube
nbensa 2 months ago
6:23 WHAT? Did you say "you CAN'T run vim without sudo"?? Enough, I was going to watch the whole video, but this is a blatant bullshit. You're spreading lies. You better stop teaching because you are doing it WRONG.
Sign in to YouTube
Sign in to YouTube