Vous êtes sur la page 1sur 3

Common LINUX Command

The following is a list of commonly used LINUX/UNIX commands which may be of value during your Telnet sessions.
Remember that LINUX/UNIX is case sensitive. Options or flags which can be used with a command are placed in [ ]. The [ ]
are not part of the command and should not be included in the command that you type.

login username allows you to login for a Telnet session


passwd changes your password
logout logs you out of a Telnet session
change directory; cd .. moves you backwards to the next
cd higher subdirectory level; cd / moves you to the highest
directory level
changes the permissions for a file; permissions should
include a letter designating who gets permissions (u for the
user, g for the group, o for others, or a for all) followed by a
+ or - (to give or take away the permission) followed by the
chmod permissions filenames kind of permission (r for read access, w for write access, x
for execute if the file is a program or script); the complete
command that you type should look like:

chmod g-w filename


chown user:group filenames changes ownership of a file
clear clears the screen
copies a file; this leaves the old file intact and makes a new
cp oldfiles newfiles
copy with a new filename
date tells you the current date and time
displays how much space on the disks (harddrive partitions)
df
is free
tells you how much disk space your files occupy; the -a
option displays the space used by each file, not just each
du [-a] [-s] directories
directory; the -s option displays the total space used for each
directory but not subdirectory
provides information concerning a user; finger without the
finger username@servername username@servername will provide information concerning
who is using the server at that time
provides online help; several topics have been included in the
help
help system available on the servers
ls [-l] [-a] [-p] [-r] [-t] [-x] lists the files in a directory; -l displays detailed informtion
about each file and directory, including persmissions,
owners, size and time/date when the file was last modified;
-a option displays all the files and subdirectories including
hidden files (with names that begin with a dot); -p displays a
slash at the end of each directory name to distinquish them
from filenames; -r displays files in reverse order; -t displays
files in order of modification time; -x displays the filenames
in columns across the screen.
Lynx is a text-based, non-graphical web brower for use in
lynx servername or URL
Telnet session
displays the reference manual page about a LINUX
command; the -k keywords option allows you to see all man
man [-k keywords] topic
pages that contain that keyword; topic is the command or
topic which you want information about
lets you control whether other people can use the talk
mesg [n|y] command to interrupt you with on-screen messaging; mesg n
will block the interruptions; mesg y will allow interruptions
makes a new subdirectory with the name specified by
mkdir new_directory
new_directory
renames a file or moves it from one filename or directory to
mv [-i] oldname newname another; the -i option tells mv to prompt you before it
replaces an existing filename
provides conversion of an IP address to an alias of a
nslookup IP address or server alias computer if it is registered in DNS (Domain Name Service)
or will provide the IP address for an alias
passwd changes your password
a program which allows you to read and send mail;
information concerning the use of pine can be found
pine
elsewhere in the documentation or by reading the online
manual pages for pine ( man pine )
sends a ping packet to another server; this provides
information concerning the time it takes for information to
ping IP address or server alias
make the round trip to the other computer; it will also tell
you whether the other server is on-line at that time
displays information about your processes/jobs/programs
ps
which are running on the server
removes or deletes files; the -i option asks you to confirm
that you want to delete each file; the -r option is dangerous
rm [-i] [-r] filenames
because it allow you to delete an entire directory and all of
the files it contains
removes a directory; you can use the -i and -r options which
rmdir directory
are described in the rm command
tail [-r] [-lines] filename displays the last few lines of a file; -r displays the lines in
reverse order; -lines specifies the number of lines, starting at
the end of the file, you want to see
allows you to talk to another user by typing messages to each
talk username@servername other on-screen; to prevent someone from talking to you, see
the mesg n command
changes the date and time for a file without changing the
content of the file; -a changes onlyt the date and time the file
was last accessed; -c doesn't create a file if it does not already
touch [-a] [-c] [-m] [date] filenames exist; -m changes only the date and time the file was last
modified; date specifies the date and time to give the file in
the mmddhhnn format (month, day, hour, minute); touch
with a new filename with create a new, empty file.
provides information concerning the route which packets
must take to get from your computer (the server in this case)
traceroute IP address or server alias
to a remote computer/server; typically used to diagnose
possible problems in packet routing
VI is a text editor. Further information concerning the editing
vi
commands for VI can be found in the help document.
provides information concerning who is logged into the
w
system and some details on how they are connected
who tells you who is using the server at that time
sends a message to another person using the system; to
write username prevent someone from writing to you, see the mesg n
command

Vous aimerez peut-être aussi