Site Panel Help User Panel Help Panel Demo's Search Help

Categories

· Show all categories

New Customer FAQs
E-Mail
FTP - File Transfers
Domains
SSH and Telnet
Scripting Languages
Password Protection
MySQL
Stats
Power Tools

· FAQ Home

· EchoEcho+ Support

SSH and Telnet: Basic command reference
This is a short list of the most useful Linux commands that you might need during an SSH or Telnet login:

--------------------------------------------------------------------------------



Working With Directories

List a directory

ls -l path
Long listing, with date, size and permissions.


ls -a path
Show all files, including important .dot files that don't otherwise show.


ls path | more
Show listing one screen at a time.



Change Directory

cd dirname
Change into a new directory


cd ~
Go back to home directory, useful if you're lost.


cd ..
Go back one directory.



Print working directory

pwd
Show where you are as full path. Useful if you're lost or exploring.



Make new directory

mkdir dirname
Creates a directory


Remove Directory

rmdir dirname
Only works if dirname is empty (has no files in it).


rm -rf dirname
Remove all files and subdirs. Careful!




--------------------------------------------------------------------------------



Working With Files


Copy a file or directory

cp oldfile newfile



cp -r old-directory new-directory
Recursive, copy directory and all subdirs.


Move (or rename) a file

mv oldname newname
Moving a file and renaming it are the same thing.


Find files on system

find filename
Works with wildcards.

slocate filename
This searches a database, rather than the actual directory tree, which makes it much faster than find.




--------------------------------------------------------------------------------



File Permissions

chmod 600 filename
You can read and write; the world can't. Good for files.

chmod 700 filename
You can read, write, and execute; the world can't. Good for scripts.

chmod 644 filename
You can read and write; the world can only read. Good for web pages.

chmod 755 filename
You can read, write, and execute; the world can read and execute. Good for programs you want to share.


Change file permissions with letters:

u = user (you)
g = group
a = everyone

r = read
w = write
x = execute

chmod u+rw filename
Give yourself read and write permission

chmod u+x filename
Give yourself execute permission.

chmod a+rw filename
Give read and write permission to everyone.




--------------------------------------------------------------------------------

A more extensive list is available here

Last update: 12.07.2009, 21:11
Author: EchoEcho Support

printer-friendly version Send to a friend
Show this as PDF file export as XML-File

Average rating: 0 from 5 (0 Votes )

Please rate this entry:
completely
useless

1

2

3

4

5
most
valuable
You cannot comment on this entry | Content Overview: SSH and Telnet
Copyright © EchoEchoPlus Hosting