Vous êtes sur la page 1sur 4

As with Windows ’95 and other operating systems, if you want to use

them you must be able to navigate the file system. The best and fastest
way to do this in Linux is through the use of commands.

I have decided that I won’t get into a detailed discussion of the various
major directories and subdirectories that comprise the Linux filesystem
because:

1. I can’t be bothered and I have better things to do.


2. By typing the command "xfm &" in an xterm window, one can
view, conceptualise and navigate a graphical representation of the
Linux filesystem. Note: You can also type the command "git" in
an xterm for a non-graphical view.

It is important for fellow Newbies to note that the top of your filesystem
or "root" is characterised by a "backslash" ’/’. All other directories
branch off the root directory. Therefore what you do in root is very important to the welfare of your
system and your nerves - especially when recursively deleting files and directories.

Finally, The Commands


Note: For more Information see the manual pages on local system (man), the
Linux How-To’s or Try here.
Also note: Linux commands are case sensitive
Basic File Manipulation
Command Function
cd [/usr] Change to ’/usr’ directory
ls [allansthings] List contents of directory ’allansthings’
ls -l List contents of current directory in vertical format
ls -la List contents of current directory in detailed format ie. every file,
permissions etc.
ls -S Lists files based on their size
ls -R Lists all directories and their contents below that where the
command was effected
cp [bad /root/good] copy ’bad’ to ’good’ directory
cp bad/* good Copy entire contents of ’bad’ directory to ’good’.
cp * ../ root Copy all files in current directory to parent directory
rm [bad] delete file ’bad’
rm * Removes all files in current directory
rm -r Remove files in all subdirectories where command was issued
rm -r * Remove files and directories
rm -rf [neurosis] To force delete. BEWARE when using on ’root’ (/) directory.
rmdir [bad] Remove directory ’bad’ (must be empty)
mkdir [good] Make directory named ’good’
mv [bad] [good] Rename file or directory ’bad’ to ’good’
mv [terrible] [great] Move file or directory ’terrible’ to file or directory ’great’
(Rename & Move same under Linux)
Loads the usermount tool, a program used to mount / unmount
usermount
devices.
(un)mount mounts / unmounts a device eg. "mount floppy"
mount -t iso9660 Command used to mount CD-ROM; alternatively use the
/dev/cdrom /mnt/cdrom usermount tool.
mount -t vfat /dev/hda1 Command used to mount a Windows partition (assuming it is the
/mnt/cdrive first or only partition on C Drive - which is hda1) . Alternatively,
use the usermount tool but you will probably have to add the
windows partition to it via the Linux-configuration tool
(linuxconf).
head [inflow] Output beginning of file named ’inflow’
tail [outflow] Output end of file named ’outflow’
cat [mouse] View the contents of file named ’mouse’
cat [f4 f8] > [f9] Concatenates file 4 and file 8 into file 9
less [money] Lists contents of file named ’money’ a screen of data at a time
(similar to ’more’ command above)
more [money] Lists contents of file named ’money’ by screen
emacs [money] Loads contents of file ’money’ in Emacs editor
vi [money] loads contents of file ’money’ in Vi editor

Basic System Commands


Command Function
startx Loads X Window GUI
shutdown -h now Shutsdown and halts the system
shutdown -r now Shutsdown and reboots the system
exit exits from xterm
man Linux manual eg. ’man ls’ will outline options related to ’ls’
command
linuxconf Loads the Linux-configuration tool, from where one can
configure many aspects of the system.
netconf Loads the Network Configurator which enables one to configure
Network Connectivity eg. PPP / Internet
netcfg & Use this tool to dial your ISP (select ’interface’ tab and ’activate’
button. Can also be used to configure an internet connection)
adduser Add a new user to the system eg. adduser allan
passwd Set password eg. passwd allan
df Lists amount of free space in each partition
control-panel & Loads the Control Panel tool
xfm & Loads graphical file management tool
Ctrl z Suspend current process
Ctrl s Stop screen scrolling
Ctrl q Resume screen scrolling
find Search for file eg. find / -name lilo.conf
locate Search (see ’man locate’)
whereis Search eg. ’whereis .netscape’
glint Loads graphical program indicating installed ’rpm’ applications
and their details. Also useful for installing ’rpm’ applications.
rpm -i [filename] Install rpm applications (see man rpm)
rpm -e [filename] Uninstall rpm package (see man rpm)
rpm -q [filename] Query whether package is installed on system
tar -zxvf [filename] Unzips and extracts program in .tar.gz format
printtool loads "Red Hat’s" printer configuration program.
cat [filename] > /dev/lp Send a file to be printed directly to the printer (root user / group
only).
lpr [filename] Prints a file.
lpq View contents of a print queue.
lprm - Cancel all print jobs (’lprm 15’ will cancel print job 15)
git file system viewer

The Linux Webring: [ Previous | Next | Home | Random |


List ]

[ Home ] [ Linuxbabble ] [ Getting Started ] [ Basic Linux Commands ] [ Mounting Things ]


[ Useful Links ]

Vous aimerez peut-être aussi