Sie sind auf Seite 1von 1

Some basic commands, useful for Linux terminal (Shell)


This command brings up the online Unix manual. Use it on each of the commands below.

man pwd

You will see the manual for the pwd command.


Shows what directory (folder) you are in. In Linux, your home directory is /home/particle


Changes directories.

cd mydir

Moves down from your current directory into the mydir sub directory


Moves up one directory (yes, include the two little dots) You can also move directly into directories





Takes you back to your home directory (/home/particle)

mkdir dirName Creates a directory with name dirName.

rmdir dirName Removes a directory dirName.


Lists files.

If you add al after ls it will give more details for each file. Such as, size, permissions, owners, dates etc.

ls al

You'll see a huge list of files that you can't see with the 'ls' command alone and lots of details.

If you see such a long list of files that they scroll off the terminal screen, one way to solve the problem is to use:

ls al |more less datafile1

Shows one screen of file names at a time. Show the contents of the datafile1 file to your screen with a pause at each line so you don't miss any

whereis datafile1

contents as they scroll. You may move through the file using page up, page down, home and end keys. When done with less you use the q key to get back to the main terminal. Shows you the location of the datafile1 file.



Deletes the file data1 in the current directory.


i muon*

Removes all of your muon data files ( careful!! rm * will remove ALL your files) . The "i" makes


data1 newdata/

the computer prompt before removing each file. If you really want to work without a net, omit the "i". will copy the file data1 to the directory newdata (assuming it has already been created)


data1 newdata/

moves the file data1 to the folder newdata and deletes the old one.



Prints the contents of the specified files.


Clears the terminal screen.

finger users

Prints descriptions of the specified users.


Displays the amount of used and free system memory.


Reboots the system (requires root privileges).

shutdown minutes shutdown r minutes Shuts down the system after the specified number of minutes elapses (requires root privileges). The r option causes the system to be rebooted once it has shut down.


Prints a display of system processes that's continually updated until the user presses the q key.


Mounts a drive to the operating system. Linux does not 'see' the floppy drive until you tell it to.

mount /mnt/floppy

Allows you to use the floppy drive which has directory name /mnt/floppy

cp aFile /mnt/floppy/ Copies the file aFile to the floppy disk.

ls /mnt/qfloppy/

Allows you to see what files are on your floppy. You may run into problems moving large files onto a 1.44MB floppy disk. One option to fit larger files is to create a zip archive containing the file onto the floppy. For Example:

zip /mnt/floppy/ muon.myDataRun

Moves the file muon.myDataRun into a zip file on the floppy named After you are done and before you eject it (this is very, very important), you must unmount the floppy.

Allows you to remove the floppy disk Mount usb on linux

Unmount usb drive shows you an interface to control sound etc.

umount /mnt/qfloppy

mount /dev/sda1 /mnt/yourusbfolder –t vfat

unmount /dev/sda1 Alsamixer