Chris Tate-Davies

An archive of helpful tit bits of information for development, and probably some stuff that is incomplete, wrong or boring…

Help in using Ubuntu Terminal Console

Posted on | March 18, 2010 | No Comments

Help in using Ubuntu Terminal Console


Remote connection

To ssh to another Lunix terminal, use this command:

ssh username@host -p port

The default SSH port is 21, but you could change it to anything, i.e. 9100

Remote teminal will prompt for your password, and job done.


File/Folder functions

cp – Copy file

cp /usr/bin/file /tmp/location

mkdir – Create directory/folder

mkdir /home/chris/newfolder

rm – Delete files in folder

rm -rf /home/chris/foldertoremove

The -rf tells Linux to remove files in the folder. This will remove all files and sub folders though, so be careful. There is no undelete.

mv – Rename a file, or move a file

mv /home/chris/index.htm /home/chris/home.htm
mv /home/chris/index.htm /home/chris/site/index.htm

The first command will rename a file, and the second will move it (effectively renaming it into another directory)

pwd – see what folder you are in

pwd
/home/chris/Desktop

 

 

Comments

Leave a Reply