Vim for Editing Files in Linux

Поділитися
Вставка
  • Опубліковано 25 січ 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: www.vim.org/
    Vim Manual: vimdoc.sourceforge.net/vimum.html
  • Наука та технологія

КОМЕНТАРІ • 316

  • @Rahulverma-oj8su
    @Rahulverma-oj8su 6 років тому +17

    Some useful notes after this video :
    1. vim : file editor in linux
    • 'sudo vim fileName' - open or create/open the fileName
    • 'a' - insert mode in vim
    • 'esc' - come out of insert mode
    2. search in file
    • ': / *MAX*' - look for anything like MAX letters in vim opened file, down the file from the cursor
    • ': /? *max*' - look for anything like max letters , up the file from cursor
    • 'n' - find next in search results, up or down, inside the vim opened file.
    3. switch to other file from within a file
    • ':e filename' - opens the new file
    4. quit from file
    • ':q' - quit file (quit a file, say if you edited nothing)
    • ':q!' - force quit file (sometime unable to quit a file)
    • ':wq' - save file and quit
    • ':w fileNew' - save the content of present file to other file name fileNew (save as)

  • @azzyhash7144
    @azzyhash7144 10 років тому +1

    You are much more sophisticated than the vim, seriously you have done a really great job by providing the learning pack for the common people, thanks alot

  • @dzrocks868
    @dzrocks868 5 років тому +1

    I hope I can give a 1000 likes for the way you teach. i got my current job because of listening to your videos before the interview. One of the best teachers out there. Thank you Eli.

  • @PoweredByHolden
    @PoweredByHolden 10 років тому +2

    Thanks Eli for a fantastic series of tutorials for the beginners. These tutorials have taken a lot of the fear out of learning Linux and migrating from windows.
    Clearly there are often many different ways of achieving the same result with software like vim but you only need to be told one way to learn and not all the different ways of doing the same task.
    A big thanks for your time and effort in presenting a easy to understand and effective series.

  • @Crossroad03
    @Crossroad03 12 років тому +1

    Learned more in 30 minutes than I would had ever dreamed off. Clear explanations, clear examples and How To. Wished I had a teacher like this when took a Linux College course.

  • @bvowens
    @bvowens 11 років тому +2

    Thanks Eli. Very good teaching. I like the way you repeat the main points again at the end. Your teaching is such that it makes it easy to believe a person can migrate to linux from windows. - thanks for all your hard work.

  • @kalMHe
    @kalMHe 5 років тому +1

    Man, Eli Bro you don't have any idea how much you have helped me . You're such a wonderful guy .

  • @balasundaramsamy2383
    @balasundaramsamy2383 2 роки тому

    I like that your videos are best as far as linux is concerned. All other courses and videos show slides with audio.Your videos show the instructor in frame always.Seeing the face of the instructor makes you understand better,makes you calm.Just keep your tutorial this way,that is,face to face ,eyes to heart.

  • @coolkidmcoy
    @coolkidmcoy 10 років тому +1

    Im starting my computer science degree program and your lessons help me so much, You do a great job. I passed your interview with the recruiter onto one of my professors.

  • @aseeker2010
    @aseeker2010 11 років тому +1

    Eli did warn us that there are some hard-core egomaniacs in the Linux user crowd who have to be the only ones right. He also managed to demonstrate that quite effectively by drawing them out of the woodwork.
    Thanks for the great intro material Eli.

  • @aronpop1447
    @aronpop1447 4 роки тому +1

    You are probably the best teacher on youtube without a doubt

  • @jochenstacker
    @jochenstacker 9 років тому +11

    It just doesn't feel like a Linux tutorial without being patronised, talked down to and shouted at :-)

  • @vincentinbox
    @vincentinbox 9 років тому +1

    Thank you Eli, this is awesome. Thank you for sharing your knowledge

  • @WmTyndale
    @WmTyndale 7 років тому +1

    Brilliant pedagogical presentation. Absorbed in one sitting!

  • @ephremabebe4900
    @ephremabebe4900 10 років тому +1

    Thank you Eli. You make things easy. I really appreciate your presentations. So, easy to understand.

  • @elithecomputerguy
    @elithecomputerguy  11 років тому +2

    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...

  • @sonypiplode8750
    @sonypiplode8750 7 років тому

    since last week your videos are like my good breakfast. best usage of my time

  • @Vikinngdk
    @Vikinngdk 12 років тому +1

    Great teacher! Thank you very much for these lessons man!

  • @h0ph1p13
    @h0ph1p13 8 років тому

    Great tutorials Eli! Thank you very much!

  • @wubalm
    @wubalm 10 років тому

    Thank you for your clear introduction on vim. I really liked your class.

  • @jakeambrose4294
    @jakeambrose4294 8 років тому

    you're videos always are great thanks eli

  • @krishnasony7429
    @krishnasony7429 7 років тому +1

    THANKS Eli.. it is very useful for beginner...

  • @godlistenheaven600
    @godlistenheaven600 11 років тому

    for those who think you know, this is NOT for you! but for us who are just beginning to use linux, meeen! it's made a lot easy to sink in!
    big up Eli.

  • @slipperedlobster
    @slipperedlobster 5 років тому

    Great teaching voice...great communicator. I just found your channel. It's helping me understand Linux much better.

  • @BrainDesmo
    @BrainDesmo 8 років тому +3

    Thank you sir. Great stuff

  • @binhuang3805
    @binhuang3805 9 років тому

    Thank you very much,the tutorial is pretty easy to understand even for a Chinese student who isn't familiar with English and IT.

  • @SusanAmberBruce
    @SusanAmberBruce 7 років тому

    Great thanks Eli,
    I am English and from England and 60 years young, ( I wish people would say United Kingdom or leave it out; as I hate being called a resident of UK)
    Yeah It's nothing you said Eli, just a lot of information systems now shorten United Kingdom to UK and it's not nice.
    Yeah I found your lessons very helpful and I am defiantly thinking of changing to Linux for the power of command line usage.
    I really like your idea of using Windows 7 for GUI and Linux server for command line usage.
    So I downloaded Linux Mint to get me started as it's easy to experiment with Linux without even installing it.
    Your Lessons have been very helpful Eli; so thanks again.

  • @leehouchin2871
    @leehouchin2871 8 років тому +1

    He is absolutely right about editor wars between linux geeks. The side you end up on depends on who showed you how to use whatever editor first. I'll have to say that I know emacs very well and it has been my go to editor for a long time. The problem with emacs is that it is a rather large app to put on a server (if you are penny-pinching space), and Vi/Vim are much more lightweight which is why they are the editors of choice for server systems.
    I must give a hat tip to Eli. His explanation and walk-through of Vim was very well done. I know this tutorial is at least 4 years old, but everything Eli explains here is still relevant today (2016 at the time of this post). It is well worth a review if you are not familiar with Vim.

    • @barath4545
      @barath4545 8 років тому

      +Lee Houchin I use to be an Emacs guy too as vi was kinda badmouthed at my Uni. Used it from 1998-2003 isch on off and now since 2014 I exclusively use vi as I work on minimal installation CentOS Linux nodes in clusters. I basically know like 10 things in vi and thats it, but its enough. I never learned Elisp or even "how to steal good" but I just kept using Emacs cause it did have some smart features back then, like multi-pane editing and when I was the most hardcore I nearly never touched the mouse (X11 manager on IRIX mostly back then and Redhat Linux of the Fedora kind, earliest versions). I hear you loud and clear and its damn true. But for server managers there is only really vi and maybe nano for the few that like that.
      Even as a vi advocate I will still say that it is a bit weird and one has to learn the vi tricks that only works in that editor, ie it doesnt share any standard stuff with any other programs which for me is the annoying part.

  • @leeweldon7016
    @leeweldon7016 7 років тому

    I've gotta say this guy has officially convinced me to have a dual boot of windows and linux, from a brand new game developer standpoint, he's giving me a good background on a process of you know developing the game in windows, using IDE's like visual studio or sublime compiling and 3d models from blender putting them into unreal engine, however from what I gather unreal engine is glitchy as hell in linux and a lot of IDE's given visual studio is microsoft it'll probably never see linux compatibility. However rather to compile on windows then just use linux vim to edit and to maintain the server is friggen brilliant and I think this guy has some great insight into it. Because for me I only started to do all this a few weeks ago and I wouldn't have even known what an IDE or any of that all is but fuck this is just amazement, I feel like I understand life now.

  • @fraros
    @fraros 12 років тому

    your explanations are very clear, thank you mate

  • @andrewwalden6797
    @andrewwalden6797 5 років тому

    Thank you. This has helped a lot.

  • @eddiedreizehn5062
    @eddiedreizehn5062 11 років тому

    thank you Eli - always very good videos!

  • @rossmanngroup
    @rossmanngroup 11 років тому +2

    Most of Eli's videos are not made from an encyclopedic standpoint. He wants to get a general concept across, which is difficult if you keep getting into subconcepts and subconcepts before someone understands the base concept. His teaching style makes it very easy to attack the content for not being detailed enough, or verbose. However, it's also a great way to explain something to someone who doesn't understand what the hell you're talking about.

    • @INeedAttentionEXE
      @INeedAttentionEXE 3 роки тому

      Haha, good to see you here, 7 years too late. I can actually vouch, I am learning something from Eli.

  • @TheNangaboko
    @TheNangaboko 11 років тому

    Just great...Well done Elite.

  • @VeronikaLyubenko
    @VeronikaLyubenko 9 років тому +2

    Eli, your videos are amazing! Thank you!
    I would like to add just one thing. As a beginner, I stuck with 'quitting' the file.
    As I figured later, first, I had to hit the 'Esc' key to go into command mode. And only then type :wq.

  • @RuslanZinovyev
    @RuslanZinovyev 9 років тому

    Thank you mate you are great teacher.

  • @pskk6644
    @pskk6644 8 років тому

    These videos are really helping. :)

  • @RiteshAgarwalGwalior
    @RiteshAgarwalGwalior 12 років тому +1

    I am now just a fan of your.. Your are really awesome in explaining things... even if a person do have 0 knowledge you explained everything perfectly.... Thank you very much for all your awesome videos...
    Looking forward for some videos on Vmware technologies like ESX3.5, 4 :)

  • @saurabh08ec
    @saurabh08ec 12 років тому

    thanks sir.You help many professional by sharing these videos.................. thanks a lot......

  • @magnspower5821
    @magnspower5821 9 років тому

    thanks Eli , good video !!

  • @stephenjasonwang
    @stephenjasonwang 11 років тому

    I LOVE YOU ELI.... BEST TEACHER EVER!

  • @TheIllumaniac
    @TheIllumaniac 10 років тому

    Sir, you Rocked!

  • @malikhaider366
    @malikhaider366 11 років тому

    Hi Eli is just teaching us the basics to start in this class . Of course there are lots of things you have to consider before you making any changes to your production server . (sp. Security and FW ). He is the best person here if you have time upload your video and provide the link..

  • @ink5473
    @ink5473 8 років тому

    Thank you Eli :)

  • @duggiralatejavenkatesh6304
    @duggiralatejavenkatesh6304 7 років тому

    thank you sir..... your vedios helped me a lot

  • @PedroRamirez-bm6yd
    @PedroRamirez-bm6yd 7 років тому

    The tutorial was great and I enjoy it as most of your videos. Ubuntu 16.04 is my first experience with Linux, and in it I was completely lost following your instruccions. After hours expending trying many codes to make the word INSERT comes up. Whent to a Ubuntu wep community page and discover that Vim is not there until is downloaded. So I installed Vim and back again to finished your video tutorial.

  • @VasilyMT
    @VasilyMT 10 років тому +1

    Ricardo is right in something. The lesson is good, but it would be a great idea to introduce file permissions before...
    Change owner to modify a root owned config is a very strange approach. By the way, sudo vim ... will alow to modify any file. Cause it's a sudo. =)
    Other example to introduce chown command is needed.
    Learn security! Other way Eli will teach other people to hacking on your server. =)

  • @hashman3213
    @hashman3213 9 років тому

    i rilly like your video's and am learning allot of cool stuff,

  • @fuzzballhalltaurus2117
    @fuzzballhalltaurus2117 10 років тому

    1000 Thx !! Awesome!

  • @solanotico
    @solanotico 9 років тому

    Best teacher Eli!

  • @djyotta
    @djyotta 8 років тому

    16:25 - I love it. I don't think there is a more succinct way to describe the linux system.

  • @nathanhargreaves7071
    @nathanhargreaves7071 8 років тому +4

    I've been using Linux for a few months now and I've come to always be explicit with file extensions. While they make no difference to the system itself, they're a major advantage / convenience to the user [For example, if you do ls -X, the files will be listed alphabetically by file extension, e.g., osifoe.abc, skefeui.bcd eajfhawdj.cde.]. So if I make or download a file, I'll always append the file name with the appropriate file extension.
    Linux doesn't get confused by miss assigned file extensions, either. You can take a .jpg and call it a .txt and an image viewer won't care.
    By the way, It's my understanding that all system configuration files in Linux are plain text. Meaning that any editor can view / edit them.

    • @Tennouseijin
      @Tennouseijin 7 років тому +2

      There are plenty of Linux programs that do expect correct extensions though. While it's true that you can tell a program to open a file despite a wrong extension (if you name an image file "picture.txt", a graphics editor can still open it), but still:
      - Many linux file managers will depend on the extension to assign an icon and a default program to open a file.
      - Software that scans your filesystem for specific files will often rely on the extension. E.g. music managers (like Banshee) will look for .mp3, .ogg, .flac and other music files. A music file with a wrong extension (or none) will not be found.
      While the above mostly relate to Linux desktops, servers have their own share of issues - just imagine a fileserver or webserver that only allows users to upload image files etc.
      (although it may be a good idea to check if a user tries to upload a virus with a .jpg extension)

  • @user-tq6my4sx1g
    @user-tq6my4sx1g 9 років тому

    you rock! eli

  • @stumashaal6365
    @stumashaal6365 7 років тому

    if you want to learn vim there are three steps:
    1. use vimtutor. that means type 'vimtutor' into the shell. do the whole thing. it takes an hour.
    2. try and use vim to do literally everything for the next two weeks. Some exceptions to this rule are programming huge apps that require an IDE for code completion (like Android apps, large web apps maybe). Besides that use vim. Every time you don't know how to do something (or forget), google it.
    3. slowly start customizing vim to do what you want. youtube and google are great places to learn how this works.
    Vim makes a lot of sense. You WILL learn to use BY USING IT and googling how to do things as the need arises. If you stick with it for two weeks you'll see you're gonna love it. Slowly you'll learn about plugins, commands, scripting... that'll take a few months. You'll enjoy vim and start being good at it after like 2 weeks of consistent use though.
    If you're not a programmer or natural tinkerer, don't use vim.

  • @MSPTechDude
    @MSPTechDude 8 років тому +20

    8:25 No No No! Do not change the owner of root files! If you can read and write to the file, so can any program or script you run. It's not safe! The system also may not be able to open the files after chown changes.

    • @rochr4
      @rochr4 8 років тому

      very poor, I feel sad now ;'c
      :w !sudo tee %
      :w !sudo sh -c "cat > %"

    • @JoshuaKisb
      @JoshuaKisb 7 років тому +2

      sudo vim filename will allow you to edit files without need to permanently change permissions because its a security issue if you forget to change them back

    • @Ambassador_Kobi
      @Ambassador_Kobi 7 років тому +3

      chown user.user /etc/passwd
      Enjoy

  • @brielgaplur4260
    @brielgaplur4260 9 років тому

    thanks Eli !

  • @codesolidated
    @codesolidated 7 років тому

    You're doing the god's job. 😁

  • @joshruehlig
    @joshruehlig 12 років тому

    this tutorials are freaking awesome. Though no point in changing the ownership if your throwing sudo before every command

  • @gbasilveira
    @gbasilveira 11 років тому

    I use vim also, and I really don't want to change at all.
    What is your opinion about emacs? Will you ever make a video about it?

  • @chrishubley7849
    @chrishubley7849 10 років тому +55

    Em... I don't think it's a good idea to instruct people to "always use sudo". That's essentially running as a root user all of the time. It's true that you need to be a root user for configuration file editing... but that's not (and shouldn't be) a general case. Unless it's specifically necessary, users should not run as root because it's unsafe and could break something... There are plenty of things (most?) you might use vim for which don't require root.

    • @xplinux22
      @xplinux22 9 років тому +16

      Very much agree! Sudo is only necessary for editing files outside your home directory. It has nothing to do with which Linux distribution you're using, like he says in the video.

    • @BenVanCamp
      @BenVanCamp 5 років тому

      sudo rm *

    • @ErsanYolcu
      @ErsanYolcu 4 роки тому

      Well.. You talking from a linux person perspective. You lack empathy. Eli tries to teach people how to run commands on their personal ubuntu server, sitting at home doing nothing. Eli talks about a linux server which we can play and break. If he says use sudo here and dont use sudo there, then half of totally beginners will give up. This is why Eli wins here. Noone gives up on his videos. He makes assumptions from the beginning to make everything simple for a beginner. Not a simple for someone who already has some idea about linux. This video doesn't care what a linux person would think. And I love this approach of Eli.

  • @fabischn90
    @fabischn90 11 років тому +1

    for insert mode in VIM, try to use i instead of a. Easier to remember :D

  • @siik-ghostface
    @siik-ghostface 5 років тому

    Thank you.

  • @david52875
    @david52875 9 років тому +9

    If you edit a file in read only mode in vim you can save it using ":w !sudo tee %"

    • @BradenBest
      @BradenBest 9 років тому

      david Oh, that's neat! The thing is confusing to me, so I hardly use it except for, e.g. ":1!ls" to dump the directory contents into the buffer, or ":%!xxd" if I need to use a hex dump. all I know is that it takes lines as input and prints the result back into the buffer. I would have never guessed that this was possible, or that :w apparently writes the buffer contents to stdout. I'm going to have to play with that.
      When the read-only thing happens to me, I usually just save it to a temp file and then write it over the original. E.g...
      :wq ~/passwd
      ~$ su
      /home/braden# cat passwd > /etc/passwd && rm passwd
      I do it as root to ensure the permissions are preserved. I use 'cat >' because I always forget which one of (mv/cp) changes the owner.
      I've made that mistake so many times, though, that I've learned to catch the red "RO" at the bottom before I start editing...most of the time.
      *Edit:* my theory was correct. '!' pipes the selected lines to the command following the '!'. ":[lines] ! [command]" is equivalent to "sed -n "[lines]p" file | [command]".
      For some reason, it appears that 'w' acts like '%' when piping.
      :1,5!tee test2 (prints lines 1-5 to "test2")
      :1,5!xxd > test3 (prints a hex dump of lines 1-5 to "test3")
      I then tried it with a root owned file:
      $ su
      # cat test > test2
      # ^D
      $ vi test2
      :w [RO error]
      :%!sudo tee test2 (saved successfully)
      And it saved it it over the same file successfully. I think using "%" makes more sense, and it's strange that :w works at all.
      With this understanding, I've devised that an alternate way to do it is ":%!sudo cat>%", which selects all lines (the first %), and prints it into the same file (the second %) using I/O redirection (>).
      *Edit 2:* I just made the mistake now, and noticed that sudo cat doesn't work, oddly enough. ':%!sudo tee %' did work, though. So that brings up another question: aside from allowing you to split output between stdout and a file, what is the technical difference between 'tee' and '>' such that it means the difference between saving a file and being slapped with a permission denied error?

    • @david52875
      @david52875 9 років тому

      Braden Best fwiw here's a stack overflow question about it stackoverflow.com/questions/2600783/how-does-the-vim-write-with-sudo-trick-work

    • @BradenBest
      @BradenBest 9 років тому

      david
      Ah, I figured it out. tee is being run as sudo, but '>' is not, since it just uses the underlying shell to send 'sudo cat's output to a file. Thus, if I make the shell a root shell, and do it, then it should work
      :%!sudo sh -c "cat>%"
      And guess what, it works! And now that I understand what's going on under the hood, I won't be forgetting ':w!sudo tee %' any time soon

    • @erickhanni4874
      @erickhanni4874 9 років тому

      Braden Best

    • @BradenBest
      @BradenBest 9 років тому +1

      Eric Khanni Can someone explain what these empty replies are about? They're starting to piss me off.

  • @BradenBest
    @BradenBest 11 років тому

    23:40 there are more keybindings to go to insert mode than just 'a'.
    'a' goes to the next character
    's' removes the next character
    'o' creates an empty line below the current and goes down to it
    'i' goes directly into insert mode without other actions.

  • @SlideRSB
    @SlideRSB 7 років тому +3

    Lots of great examples of what NOT to do as a sysadmin.

  • @pavlo_koliadenko
    @pavlo_koliadenko 5 років тому

    You are cool!

  • @smartsystemsengineer3227
    @smartsystemsengineer3227 9 років тому

    Thank you ...

  • @ThrvnFn
    @ThrvnFn 12 років тому

    Vim has a very nice tool called vimtutor that teaches the basics of vim very well.

  • @adammurphy6380
    @adammurphy6380 10 років тому

    That being said, he doesn't suck, he just addresses a very basic audience. Sometimes, I feel, he is addressing an audience too basic for the task his pen testing stuff, if you're having to explain how to use virtualbox, I'm not sure the audience is ready.)
    if you don't know WHY the editor isn't allowing you to save your file (permissions issue), do "ls -l" on the parent directory and see what the permissions of the file is, definitely don't just go chowing files with sudo....

  • @rommelbojorgee.8902
    @rommelbojorgee.8902 11 років тому

    Nice Eli

  • @Deshinffxi
    @Deshinffxi 11 років тому

    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

  • @rms46
    @rms46 7 років тому +1

    There is a CLI called "file" to check file types.
    Eg. "file x.pdf"
    x.pdf: PDF document, version 1.4

  • @GNU_Linux_for_good
    @GNU_Linux_for_good 8 років тому +6

    6:15 'creating' a file (by calling it's name): not so fast! It will be created when you save that file, but it's discarded when you change your mind, and leave vim with say..
    :q!

    • @alexnezhynsky9707
      @alexnezhynsky9707 5 років тому +1

      Is it stored in RAM until you write it to the disk with :w?

  • @willb169
    @willb169 11 років тому

    I agree, Eli. I was taught on Vim & still use it primarily. I was shown Nano & it IS cool BUT I am very happy with Vim so why learn Nano, IMO?
    But... I have been explained the importance of learning Emacs along with Vim because some more high end administration is easier using a combination of the 2, so how about making us lazy folks an Emacs tutorial?
    Again, thanks for the awesome vids. I can only read so much in a day and these tutorials really help!
    BTW, I keep reading Elite Computer Guy :-D

  • @l1zard7
    @l1zard7 11 років тому +1

    and also more correct. the a stands for append not for insert.

  • @FrancesSiple
    @FrancesSiple 9 років тому +1

    11:48 "..there are no file associations.." Would not some of the files that we would be editing as administrators have file extensions for the programs to know what to do with them as well? So, it is a rule not to have them or just this file that you are making in this tutorial... Of course I have not watched passed this point at this time.
    Thank you so much for the videos so far! Learning lots!

    • @Snoopod
      @Snoopod 9 років тому

      ***** There are no file extensions in linux. Programs in linux does not care if a file ends in .png or .ini or whatever, the information about how the file is used is stored in the header of the file content itself. Some people still but .png or .ini or whatever just to remind them as users what the file is for.

    • @BradenBest
      @BradenBest 9 років тому

      DailyLGS There's also the fact that bash and a few other shells use file extensions to aid tab completion. For example, 'feh abc' will only autocomplete if I have a file named e.g. "abdcef.png". If it's "abcdef.conf", bash will ignore it. Personally, I find this to be more annoying than helpful. I shouldn't have to insert ';ls ' to make bash ignore the file extensions and quickly grab the filename. I shouldn't have to 'ls' before typing the command so I can select+paste the file with my mouse. I should be able to just press tab and have the bloody file auto-complete, regardless of the file extension, out of the box.

  • @xangelux
    @xangelux 12 років тому

    Just a few things, sudo is dangerous to use if you don't know what are you doing. The other thing is there is file assossiation in linux, but not to the extension of the file (the .txt thing on the end of the file) linux assossiates files based on the content of the file, this is done because is easy to "trick" the system if you name a file by a different extension. In the case of text editor you can open every file in your system, even binary files but you won't be able to understand it

  • @mickdundee3411
    @mickdundee3411 9 років тому

    good thanks

  • @jose8000
    @jose8000 10 років тому

    Excelentes clases !, y serían mejores si el vídeo estuviera subtitulado en idioma Castellano. De cualquier forma. Gracias.

  • @MsWindows7tutorials
    @MsWindows7tutorials 12 років тому

    @theyasin133 You first have to install vim by doing sudo apt-get install vim and then you can create the newfile.

  • @balaganeshlakshmanan526
    @balaganeshlakshmanan526 5 років тому

    Thanks...

  • @asdqwe4427
    @asdqwe4427 9 років тому +2

    Compared to other editors, creating a file is not "very, very simple". There is no hint as to what you should do. I am sure that vim is amazing when you know it well, but my favorite command is still ":q". The initial learning curve is just way too steep. Sublime if you have a gui, otherwise i'd use nano.

  • @gbasilveira
    @gbasilveira 11 років тому

    You can run/read/write any file if you have permissions to do it, it is not associated with any distribution, at this level it just kernel. in your home, most of the cases, you have full access to the entire tree, in configuration files you can't of course, so you'll need to use any user who can.
    for example, /etc/sudoers, this is a non-editable file, unless you change it's permissions, same for /etc/fstab and so on...
    permissions, one key why Linux won't run virus.

  • @Jzarecta
    @Jzarecta 11 років тому

    Well there is kinda file associations, usually on the readline under /etc/bash_completion

  • @soulreaver19802001
    @soulreaver19802001 9 років тому

    Thanks or these videos.
    Please if you have any companion book you can recommend I'll really appreciate it

  • @rms46
    @rms46 7 років тому +1

    Do "sudo su -"
    and you are a superuser!

  • @VincentVetsch
    @VincentVetsch 11 років тому

    Use sudo or su sparingly. Use it based on the file ownership.

  • @tiocsti
    @tiocsti 11 років тому

    sudo has a configuration file which controls which users are able to run which programs via sudo. The only reason he was able to change users in his examples was he had full sudo access.

  • @allfre2
    @allfre2 10 років тому +1

    Instead of :/ to search you could simply type /
    also instead of :/? for backward searches you culd simply type ?

  • @jeremyhunt8920
    @jeremyhunt8920 9 років тому +9

    Eli love you bro, but dang, you repeat everything...lots. Whew. :-)

    • @LivingMyLife1991
      @LivingMyLife1991 9 років тому +10

      Well, I think that the repeating is very good, because you learn more that way and you don't have to go to the beginning if you didn't understand something and for me it is a very good thing, because I like learning by hearing some things over and over again and these videos are made for the purpose of learning. :D

    • @chetanpawar0989
      @chetanpawar0989 9 років тому +2

      Jeremy Hunt Thats the reason I watch all his videos on 1.5x. :)
      But they are very helpful.

    • @lioar
      @lioar 5 років тому

      I like when he repeats stuff. I get it printed in the brain that way :)

  • @dargay
    @dargay 10 років тому

    vim is not user-friendly and takes getting used to but is worth learning because every Linux distro/Solaris/AIX/Unix etc will have vim on it.

  • @MrWroehrich
    @MrWroehrich 10 років тому

    Good basic introduction to vim.
    BUT: Please don't chown files willy-nilly.
    Basically the user lives in his home folder. Instances above are root owned on pupose. That prevents Joe-Blow from messing up the system by editing a crucial config-file.
    Just saying.

  • @kam1su2
    @kam1su2 11 років тому +1

    Just got to the a = insert mode. Sorry but i = insert mode, a allows you to append which also puts you into insert mode. But there is a difference.

  • @vikasroy8166
    @vikasroy8166 6 років тому

    Can you please also explain upload. How to copy-paste? How to jump to a particular line or the end line?

  • @Perciwell
    @Perciwell 7 років тому

    I appreciate your instructions, but this one has several little errors. I do not like to dicuss the mentioned problem to change the ownership of files, but something on searching / moving in files:
    - It will not work, if you use ":/ tofind" with that space, because it searchs for " tofind", a string beginning with a space.
    - To search up to the beginning of the file you have to write ":?tofind", without the beginning slash "/".
    - At least for searching you need not to go to the complex mode by pressing ":". It's enough to press "/" oder "?" in the command mode.
    That's how it works on my system a 64-Bit-PC currently used under Linux Mint 18.
    Again, I appreciate your videos. (But because English is not my native language, I've problems spelling appreciate, it was the hardest part in writing this comment. Some day I will get it, I hope.) :-)

  • @adammurphy6380
    @adammurphy6380 10 років тому

    a bit harsh, but many of your points are accurate.

  • @Valyrie97
    @Valyrie97 10 років тому +4

    im sorry, but though file associations are a little weird in linux, you can still have a filetype that will be associated with a program. either that or double clicking a png is black magic.

    • @Valyrie97
      @Valyrie97 10 років тому

      regardless of OS is a bit off. because if you use a different file system it may not.

  • @mam18latmam18lat
    @mam18latmam18lat 12 років тому

    I understand that you type ":wq" instead of ":x" because it's easier for new people to remember. But don't you think that it would be easier to teach them that going to insert mode can be accomplished by hiting 'i'? In this video it would be also good if you would show them what's going to happen when they edit some config file (without sudo) and they would like to save. It would be easier than this part about chown. Anyway great job, you videos are really valuable!
    PS: not ROOT just root :)

  • @basione
    @basione 11 років тому +1

    I would totally write a novel in vim.

  • @jaykumarpatel6908
    @jaykumarpatel6908 6 років тому

    can you please make a redhat server video for server administration ?