Classic Beginner "Old School" Command Reference

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search

(A). Linux simple command reference


1. mount and access your atapi cdrom drive

  • primarily outdated

To use an atapi cdrom drive you first have to mount the drive to your linux filesystem. To do this you type the following:
mount /dev/cdrom /mnt/cdrom
To access the filesystem on the cdrom, you need to change to the mounted devices directory:
cd /mnt/cdrom
The directory tree in the directory /mnt/cdrom is actually the directory tree of the cdrom filesystem. You will not be allowed to remove the cd disc from the cdrom drive while the device is mounted, you must first unmount the device. To unmount the cdrom device, the directory tree of cdrom can not be open and no file on the cdrom can be open or in use. When you are certain that no directory in /mnt/cdrom or file there is open, type the following to unmount the cdrom device from your linux filesystem:
umount /dev/cdrom
With the device now unmounted, you can safely eject your cd disc from the cdrom drive.

2. mount and access your floppy disk drive

  • primarily outdated

To use your computer's floppy disk drive, you must first mount the device. The explination is much the same as for mounting an atapi cdrom device with one minor exception, you can eject the floppy disk while the device is mounted, but you must NEVER do that, it may corrupt your filesystem. To mount the floppy disk device type:
mount /dev/fd0 /mnt/floppy
Where fd0 is the device driver for a standard PC floppy disk drive. Redhat linux will read from floppy disks formatted MS-DOS as well as a linux filesystem. To locate the root directory of your floppy disk type:
cd /mnt/floppy
Windows 95 long filenames will be truncated under the linux filesystem. Before you should remove your floppy disk from the drive, you must close all open files and directores on the mounted device. Then type:
umount /dev/fd0
With the device unmounted, you can now safely eject your floppy disk from the drive.

3. properly shutdown and turn off your linux pc

  • current and still applicable

I can not stress to you how important it is to properly shutdown and turn off your linux computer. By just pressing the power switch while the machine is running, without executing a proper shutdown procedure, you can corrupt your filesystem or the linux kernel itself. If you are in X-Windows, first exit that, and in console while logged in type the following:
shutdown -h now
That unmounts all your linux drives and stops or kills all running processes. The -h switch indicates for linux to do a complete shutdown and stop. The 'now' refers to when the shutdown will commence. You can replace 'now' with a numeric amount in minutes to allow all the users logged into the linux server an opportunity to save their work and log off. When you initiate a shutdown, a global message goes out to all the users logged into the system, alerting them there will be a system shutdown and how soon the shutdown will commence. Two more examples of shutdown are:
shutdown -h 5
This will initiate a system shutdown and halt in 5 minutes from the time entered and alert all users currently logged in.
shutdown -r now
Causes the system to shutdown and then reboot itself. In some older distributions this would not cleanly unmount the drives. This is no longer a problem with most modern distributions.

4. start XFree86 in more than 256 colours

  • primarily outdated

The X-Window system can be started in more than the standard 256 colour mode, given that you have the graphic hardware to support higher and true colour modes. To start X-Windows in 32,768 colour mode type startx with the following switches:
startx -- -bpp 15
Other options for command line switches relating to the colour mode X loads in are: 15= 32768, 16 bpp= 65536, 24 or 32 bpp,= 16.7 million colours. So to start X in 24 bit mode, with 16.7 million colours you simply type:
startx -- -bpp 24

5. multi-tasking and multiple logins with hot keys

  • current and still applicable

You can log in as 6 different users or log in 6 times as the same user all from the linux server by switching consoles. Each console acts as a remote login from a terminal unless logged in as root. You can switch from console to console with the Hot Keys:
Alt-F2
You can use Alt-F1 though F6 to navigate from all six consoles. So if you are in console one, the default, you can press 'alt-F2' to login again on the second console. This creates a multi-tasking advantage that most other operating systems can not accomplish without reduced performanced. Each linux login has absolutly the same resources as the first. If you are using the X-Windows interface in the default login (F1) you can not Hot Key to another login console without first switching out of X. This does not mean you have to shutdown X, only that you have to use the addition of the control key to switch to a console. If I want to switch from X on (F1) to the login prompt on (X2) then I press:
Ctrl-Alt-F2
That also applies as the first example, F2-F6 consoles with the addition of the control key. The F7 Hot Key is reserved for switching back into the X-Windows interface. So to go from console mode on (F2) back into X on (F1) just type:
Alt-F7

6. a simple way to edit a text file

  • current and still applicable

To edit a text file from console on the command line type the following:
pico filename
pico is a simple text editor much like the MS-DOS edit text editor. To edit a file called data.text in /usr/local, and also disable the word wrap so that pico doesn't format the text, just type:
pico -w /usr/local/data.text
I recommend to always use the -w switch option, espically if modifying linux executable scripts.

update: pico is part of the pine package, no longer included in Redhat's latest public distributions under the name Fedora. You may install the pine package rpm or bite the bullet and learn 'vi'.
vi filename

7. display the current working directory

  • current and still applicable

To echo to the screen the current path of the working directory you are in, just type:
pwd
It is also possible to make the shell prompt always display the working directory.

8. display your current kernel version

  • current and still applicable

To echo to the screen the current version of your linux kernel you need only type:
uname -r
You may also wish to determine the Linux version.
uname -a


End of document one. June 16, 1998 www.robotz.com

{[index.html linux menu page]}

 

 

Archivedhansolocarbonite140.png
Carbonite Page: This page is an archived entry and should not be modified. Information on this page may be out of date, however, still useful. An example is data for legacy systems or outdated technologies that are still being used by some, such as Vacuum Tube bogey values, analog broadcast television frequencies or MS-DOS 6.22 commands. Although outdated, this information will not change or evolve any further. Certain archived pages on the D.U.C.K. Wiki have been imported from our older ANSI BBS system and other storage mediums previously used. These pages are kept unmodified for archival purposes.