Type cd /etc/apt
Type vi sources.list
You’ll now find yourself facing vi, undoubtedly the worst editor ever invented. But without a GUI on your server, you have little choice. Plus, it’s very handy to know the basics of vi because it's part of every Linux and unix system.
To move the cursor up, down, left and right, use the k, j, h and l keys. To delete the character under the cursor, press x. That should be enough to allow you to delete any line that makes reference to "deb cdrom" and which isn’t already commented out (ie, which doesn’t have a # at the start).
If you mess up, type :q! and press return to abandon vi. If you manage to make it work, type :w to save the file and then :q to quit vi.
You won’t have to use vi very often. Later on we’ll install Webmin, which lets you maintain your server from another machine via a web browser. There’s a proper file manager and editor built into Webmin, thankfully.
Názor k článku
Editor Vim efektívnejšie
Lenin (neregistrovaný)
12. 2. 2008 16:17

