Skip to content

Latest commit

 

History

History
122 lines (120 loc) · 3.47 KB

File metadata and controls

122 lines (120 loc) · 3.47 KB

Linux Simple Tutorial

This is a simple tutorial for linux beginner.

Login workstation

Windows User

Please download putty or pietty
Image of windows ssh After enter the workstation, key in account and password.

Mac User

Open your Terminal (終端機), and key in the command

ssh [account]@[workstation]

For example,

ssh tms17nla04@z-greenwich.math.ntu.edu.tw

If you see the following the information, key 'yes'

The authenticity of host 'workstation' can't be established.
ECDSA key fingerprint is SHA256:**********.
Are you sure you want to continue connecting (yes/no)?
yes

Image of mac ssh

Get this repository

git clone

Use git to download the repository
Copy the URL in the GitHub Image of git url

git clone https://github.com/wlab-pro/NLA17.git

If you want to clone into different directory, you can use this command

git clone https://github.com/wlab-pro/NLA17.git [folder name]

For example,

git clone https://github.com/wlab-pro/NLA17.git NLA17_test

Note:
If the folder already exists, git clone will fail.
Please delete the folder or clone into another folder.

wget or Filezilla

In the release page, we can download the previous released file. image of release page You can select *.zip or *.tar.gz

FileZilla

Go to FileZilla website to download the FileZilla Client

  1. Connect to the workstation image of filezilla connection
  2. Upload the file Drag files to the right window for uploading files. image of filezilla uploading

wget

Copy the download link in the release page. Download it by this command

wget [download-url]

For example,

wget https://github.com/wlab-pro/NLA17/archive/lab01.zip

For *.zip, use unzip to decompress it

unzip [*.zip]

image of wget zip For *.tar.gz, use tar zxvf to decompress it

tar zxvf [*.tar.gz]

image of wget targz

Linux commands

File managing

We usually use 'pwd', 'cd', 'ls', 'mkdir', 'mv'

  • pwd It tells us the path where we are now.
pwd
  • cd
cd [folder-path]
  • ls List the files and directories.
ls
  • mkdir Make a new directory
mkdir [folder-name]
  • mv Move file or directory
mv [source] [destination]

image of linux file Please see websites 鳥哥的私房菜 Linux 檔案與目錄管理 or wikibook

Workstaion Editor

Use 'vi', 'vim' or 'nano' on the workstation
For nano, its command is at the bottom of window.
Note. ^ means Control button, so '^X' means 'Control + X'.
For vi, Please see websites 鳥哥的私房菜 vim 程式編輯器

Local Editor

I recommand 'Sublime Text' and 'Visual Studio Code'.
They allow us to edit file in our workstation. Upload files to the workstation automatically when we save files.
For Sublime Text, install 'Package Control' and then install 'SFTP'.
For Visual Studio Code, install 'ftp-sync'.