Vector Linux 5
the power of the CLI
1. Introduction 2. Useful CLI applications
Have you ever found yourself in a situation where
a system refuses to enter the GUI and you need to edit some configuration
file or download some patch or driver ?
Type "mc" to open Midnight Manager, it
is a filemanager (so you can copy files around with it).
F9 -> F -> S
mc is also an ftp client !! You open it, then press F9, press "P" or select "FTP" on the menu. You will reach a dialog where you must enter the connection details; press F1 to see some instructions about itīs formatting.
Type "lynx ftp.nluug.nl/pub/os/Linux/distr/vectorlinux/" and you will be browsing in CLI mode a mirror of the VL server. Browse around to get the files you need, then move them with mc to their "appropiate places".
There is a command line utility named wget wich can be used as a Download Manager, it is not "interactive" but rather a "set and forget" application. Basically, you need to type ´wget´ followed by the address of a file and it downloads it to the directory where you are standing.
Among other features, it can be used for http and ftp links, just type "man wget" to learn about it´s many options.
Yet again, mc proves to be incredibly useful.
F2 -> select install current .tgz package -> press [Enter]
F2 -> remove a package listed in [...] -> press [Enter]
Attaching another device to your filesystem is easy. All you have to do is use the mount command, along with a few options. Using mount can also be made much more simple if the device has an entry in the /etc/fstab file. For example, let's say that I wanted to mount my CD-ROM drive and that my fstab file looked like the example from the previous section. I would call mount like this:
# mount /mnt/cdrom
Since there is an entry in fstab for that mount point, mount knows what options to use. If there wasn't an entry for that device, I would have to use several options for mount:
The -t iso9660 is the filesystem type of the device to mount. In this case, it would be the iso9660 filesystem which is what CD-ROM drives most commonly use. The -o ro tells mount to mount the device read-only. The /dev/cdrom is the name of the device to mount, and /mnt/cdrom is the location on the filesystem to mount the drive.
Before you can remove a floppy, CD-ROM, or other removable device that is currently mounted, you'll have to unmount it. That is done using the umount command. Don't ask where the n went because we couldn't tell you. You can use either the mounted device or the mount point as the argument to umount. For example, if you wanted to unmount the CD-ROM from the previous example, either of these commands would work:
# umount /dev/cdrom # umount /mnt/cdrom
Note: Since version VectorLinux 5.0 you can create and remove "mount points" using VASM, however, devices will not be mounted automatically; so this guide can probe useful when you need to mount a device but you can´t use a GUI application for some reason.
2004 Vector Linux