Basic Commands
copy |
cp |
move |
mv |
rename |
mv |
directory listing |
ls |
change directory |
cd |
create directory |
mkdir |
show current directory |
pwd |
change file permissions |
chmod |
change password |
passwd |
text editors |
pico or vi |
logout |
logout |
More Examples
ls |
returns a directory listing in multiple columns |
ls -l |
gives a fuller listing including file permissions, size, date created |
ls -al |
similar to the above but includes "dot" (hidden) files |
cd |
return to home directory |
cd .. |
move up one directory level |
cd ../.. |
move up two directory levels |
cp file1 file2 |
copy file1 to file2 |
cp file1 directory |
copy file1 to directory |
cp file1 file2 directory |
copy file1 and file2 to directory |
mv file1 file2 |
renames file1 as file2 |
mv directory newdirectory |
renames directory as newdirectory |
mv file1 directory |
moves file1 to directory |
mkdir dir1 |
creates directory named dir1 in the current directory |
more dir1 |
Lists files in directory dir1, one screen at a time. Pressing space bar displays the next screenful and pressing q or ctrl-c cancels the listing. |
more file1 |
displays contents of file1, one screen at a time |
cat file1 |
displays file1 on screen |
cat file1 file2 > file12 |
combines files file1 and file2 into a new file called file12 |
cat file1 >> file2 |
appends file1 to file2 |
chmod u+w file1 |
add write permission to user for file1 |
chmod g+x file1 |
add execute permission to group for file1 |
chmod o-r file1 |
remove read permission for others (world) for file1 |
chmod a+rx file1 |
add read and execute permission to user, group, and others for file1 |
man chmod |
displays the manual page for command chmod |
man -k keyword |
shows all the manual pages that contain keyword |
pwd |
displays the current (present) working directory |
rm file1 |
deletes file1 (note: never use rm *, it will delete all your files) |
rm -i file1 |
deletes file1 in interactive mode (asks for confirmation) |
rmdir dir1 |
deletes directory dir1 |
passwd |
Changes your password. We recommend that you use passwords of two three letter words connected with puncutation symbol or a number in order to have better security (and easy to remember). |
logout |
terminates a session |
exit |
terminates a session |
Also check out some of the thousands of Linux introductory articles online! Here's one:
http://lifehacker.com/5633909/who-needs-a-mouse-learn-to-use-the-command-line-for-almost-anything