Skip to main content

LAB OS 5 (Mini Project)

__________________________________________________

** Before we start the lab, please Install and Launch Linux. **

__________________________________________________

Troubleshooting Bad Connections

1. Run command "ping www.haifengunimap.blogspot.com". (You may change to any other existing websites) 

    - This command will continuously to ping the website inserted. 

    - The output will be shown as below : (in normal condition) 

    - To stop the output, press "Ctrl + C" . 

__________________________________________________

Copying Files to Another Machine - FTP and SCP

**Not counting email, the 2 most common ways to copy files to another machine are using FTP and SCP. 

**FTP = File Transfer Protocol 

**SCP = Secure Copy 

__________________________________________________

** Before carry on, please install Filezilla Server in your PC. **

(1) Google "filezilla server" and go to the website to download it. 

    - Below is the example to download Filezilla Server : 

(2) Install and set up the server. 

__________________________________________________

1. Run command "ftp" follow by your Windows IP address. 

    - In my case, I use "ftp 10.12.144.227" 

2. Type in the Username and Password. 

3. If you login successfully, it will show something like "Logged on" in the terminal. 

4. After that, try run command "ls -la". 

    - You should see a listing of file as below : 

5. Run command "help" to show a list of commands. 

6. One thing to remember when using ftp is to know where you are at all times. 

    - Run command "pwd" 

7. The commands you type are on the server. To run a command locally, prefix the command with an exlamation mark. For examples : 

    - Run command "!pwd" 

    - Run command "!ls" 

8. Run command "lcd /tmp" to change your local directory to /tmp. 

9. Run command "put f1.txt" to copy the file "f1.txt" to the server. 

10. Run command "get f1.txt" to retrieve the file "f1.txt" from the server. 

11. After you finished with you ftp session, run command "quit". 

__________________________________________________

**Now we run some scp commands. ** 

1. First, create a file. 

    - For example, I create file "f1.txt" 

    - Below is screenshot of the file in Linuxmint

2. Run command "scp f1.txt User@192.168.43.53:/D:/" 

    - "f1.txt" is the local filename that I want to copy. 

    - "User" is my username. 

    - "192.168.43.53" is the IP address of the host. 

    - "D:/" is the directory that I want to copy the file to. 


    - Below is the screenshot of the file in Windows

3. Enter the password of the User. 

4. Assuming you have a file "f5.txt" in Windows, try run command "scp User@192.168.43.53:/D:/f5.txt /tmp" 

    - "D:/f5.txt" is the file location in Windows. 

    - "/tmp" is the destination of the file. 


    - Below is the screenshot of the file in Windows : 

    - Below is the screenshot of the file in Linuxmint : 

5. Enter the password of the User. 

6. Now run command "ls -la" 

7. Below is the screenshot of outputs of commands above : 

__________________________________________________

Logging into another Machine - Telnet and Secure Shell

** Telnet is an older protocol but is still used a lot today. It suffers from the same security problem as FTP. (It sends text in a non-encrypted format). **

**Please turn off the firewall before using Telnet. **

__________________________________________________

**Before carry on, please install Telnet Server in your PC. **

    - I use KpyM Telnet server

(1) Google "kpym telnet server" and go to the website to download it. 

    - Below is the example to download the server : 

(2) Install the server. 

(3) Make sure you select Port 23 for the server. 

__________________________________________________

1. Run command "telnet 192.168.43.53" 

2. A banner as below will be shown : 

3. Enter the Username and Password. 

4. Run command "dir" to see the list of directories. 

5. Run command "exit" to end the session. 

6. Below is the screenshot of the output of the commands : 

__________________________________________________

** Follow the instructions stated in this website below to install SSH server. **

https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse

__________________________________________________

**Now we try running the Secure Shell session. **

1. Run command "ssh linuxmint@192.168.43.138" 

    - "linuxmint" is the username. 

    - "192.168.43.138" is the IP address of the host. 

    - Below is the screenshot of command to figure out the host IP address : 

2. Run command "pwd" 

3. Run command "uptime" 

4. Run command "exit" to end session. 

* I run the commands above in Command Prompt. * 

__________________________________________________

Getting a Web Page Without a Browser - wget

** The wget program allows you to download files from URLs.
The simplest command is : "wget <URl>". 
If there is no errors, it will place that file in the current directory.
If name is no specified, the default is "index.html" file. **

1. Run command "cd /tmp" 

2. Run command "wget www.jklewis.com" 

3. The file will be named as "index.html" 

4. You can also refer to specific files. 

    - For example, run command "wget www.jklewis.com/shipfire.gif" 

5. Below is the screenshot of the output of commands above : 

__________________________________________________

** "wget" can do a lot more. With the right parameters, it can be used to clone entire websites and a lot of other neat things. **

__________________________________________________

Thank you for reading. Feel free to ask me if you have any questions.
__________________________________________________


Comments

Popular posts from this blog

LAB 1 : D'ARSONVAL GALVANOMETER

--------------------------------------------------------------------------- Please ensure you have installed Multisim software before proceeding.  Click the link here if you want to install the software :   https://www.ni.com/en-my/support/downloads/software-products/download.multisim.html#312060 --------------------------------------------------------------------------- Objectives 1. To find the internal resistance and the currect sensitivity of the galvanometer.  Exercise 1. Set the potentiometer to 510 Ω. Connect the circuit as in the Figure 1.1 and keep the voltage source in minimum position such that voltage output from the voltage terminals  are 0V. 2. Increase the voltage supply and the galvanometer pointer will deflect towards right hand side or left hand side. You can replace the galvanometer with the DMM/Ammeter  in the Multisim. Assume R g is 1.2 Ω for the given galvanometer. Vary the voltage supply until the galvanom...

LAB OS 2

__________________________________________________ ** Before we start the lab, please Install and Launch Linux. ** __________________________________________________ Command retrieval and line editing 1. Type in all the commands below and press "Enter". a) route     - "route" is used for showing or update the IP/kernel routing table. b) uptime     - "uptime" is used to find out how long the system is active (running). c) ls     - "ls" is used to list files or directions in Linux and other Unix-based Operating Systems. d) date     - "date" is used to display the system date and time.      Output of all the commands above : 2. By pressing up arrow, the previous command will be shown.     Pressed up arrow 1 time :     Pressed up arrow 2 times :          Pressed up arrow 3 times :          Output after pressed up arrow 3 times : __________________________________...

Lab 3 : Blynk Application

--------------------------------------------------------------------------- Please ensure you have installed ESP32 properly in Arduino IDE software before proceeding. Click this link if you want to install Arduino IDE :  https://www.arduino.cc/en/software --------------------------------------------------------------------------- Please ensure you have installed and setup Blynk application before proceeding. (Take note that I am using the OLD VERSION of Blynk app in this lab.) Click this link if you want to install Blynk application :  https://blynk.io/ Click this link if you want to setup Blynk application :  https://microcontrollerslab.com/control-esp32-outputs-blynk-app-arduino-ide/ --------------------------------------------------------------------------- Part A : Blynk Application   Below are the circuit connections :  --------------------------------------------------------------------------- This is the Google Drive link of the coding for Lab Pract...