Linux Basic linux/ Raspberry Pi Query

I have Raspberry Pi connected to my home network. I have this app JuiceSSH installed on my phone, which is nothing but a ssh client which helps me login to the device remotely.

My query is, if I ssh into my RPi through the app, using my 4G network and once I login, I run a wget command, in order to download a zip file, say 5GB big, which data would the RPi2 use? My understanding is that it would use the home network. Still wanted to confirm.

Additionally, if I close that session from my mobile device, while the download is happening, would it stop the download thread or the download would continue in the background?
 
Yeah it should download from home network because your SSH client is like "remote desktop" but for terminals :)

If you close the session from your mobile or there is a connectivity issue between your phone and pi (break in link) it will kill the download because the login session will close. You might be able to resume download (depending on the target server supports it) or try to look up "background SSH/console commands" for linux - I believe there is the "screen" command for that.[DOUBLEPOST=1462884479][/DOUBLEPOST]I also just saw something called "tmux" while searching for "screen" ... but best bet is to get familiar with the "screen" command/tool.
 
I use nohup, instead of screen.

just do,

Code:
$ nohup wget .... &

it will download and you can also check the progress.
 
On stackoverflow I've seen people advise against "nohup" (even with the output redirection/background & options) and they recommend to use "screen" instead.
 
I use nohup if I know I don't need to come back to the session (e.g. a wget) - nohup is good for start and forget sort of commands
screen when I may need to come back to the session to monitor the status or review/check the output
 
It will obviously use the the networks connections available to it. If the Pi has more than one connection to the internet like say a wired and WiFi connection, you cannot guarantee which one it will use. When you SSH from a mobile, it is a client connection that you use to login to the Pi and run commands on it. So any command that you run on it won't be able to use the connection of your client to download.
 
Last edited:
Back
Top