Introduction to Linux


Basic commands for your research
Useful Linux commands
Some of the general tips for Linux commands
How to use grep, find , wc, and diff commands
How to extract and archive files
How to use other's Linux...when you do not have your own Linux system.

How to use other's Linux...when you do not have your own Linux system.

If you use Macintosh, it may be hard to install all of the functions of program compilers. Even for Windows users, this instruction can be useful. You can access a remote unix server by using SSH (Secured Shell). Before accessing a server, obtain the permission from the related people, such as the owner, Itech Helpdesk, etc. The basic formula typed in terminal is:
$ ssh username@accountname
You will type the password to log in. After this, you can manipulate the files with Linux commands and installed compilers and software. Then, type "exit" to go out of the server. If you need to use graphic software such as gnuplot, log in the account with the option:
$ ssh username@accountname -X
The letter, X, must be upper case. Now, you can see your plotting popping up to the screen.

You can create codes in your computer and upload them to the server. Conversely, you can download the data run in the server. Open another terminal from your computer. Type as follows:
$ sftp username@accountname
The password will be asked. After accepted, you will use the following command to download a file, file.c:
$ get file.c
To upload a file, myfile.c, from your computer, command:
$ put myfile.c
If you want to download or upload multiple files, use mget or mput with specified file names or wildcard. For example,
$ mget *.cpp
$ mput *.cpp
This expresses to lownload every file whose extention is cpp. The following table shows the other commands for sftp:
Commands along with sftpDescription(s)
cd (directory)Change the directories on the remote server.
mkdir (directory)Create a directory on the remote server.
rmdir (directory)Delete the specified directory on the remote server.
del (file)Delete a file on the remote server.
mdel (files)Delete multiple files on the remote server.
quitLeave sftp.

For Windows, there are freeware for SSH, such as PuTTY and for sftp, such as WinSCP.

Back to Electronics Page

Back to Hiro's Physics Main