No prompt in terminal

Hi,
In most of the courses, when I opened the terminal, I have such a prompt:
jovyan@0e75b6787e3:~/work$`C

This works great, I am then able to use the following command to zip and dowload the course data:
rm -f ~/workspace.tar.gz && rm -f ~/work/workspace.tar.gz
tar -czf ~/workspace.tar.gz ~/work
mv ~/workspace.tar.gz ~/work/workspace.tar.gz

However, when I get to the course CNN: Image segmentation with U-Net (W3A2) and open the terminal, I don’t have any prompt anymore, I just have a # on a black screen

image

Therefore, the upper mentioned commands won’t work anymore, because the prompt and homedirectory are missing.

How should I proceed to get a prompt back ?

Thank you very much for your precious support,

What terminal are you referring to?

The one you open from the JupyterNotebook

Thanks for the tip, I’ve never used a terminal from the notebook. I’ll check around a little for any info about the default characteristics.

===== ===== =====

For others who may find this thread, you can open a terminal by:

File → Open → New → Terminal.

IMHO, that’s a horrible place to hide the terminal access.

FYI, the same issue was previously reported on Course 4 notebooks W2A1, W3A2, W4A2.
No solutions have been posted.

The work-around for this issue is to use the “cd /tf” command, then you’ll be in the assignment folder.
image

From there you can “cd” to the assignment folder, that’s where the notebook files are.

I do not think the specific prompt text is required, that’s just a feel-good about which folder you’re using.

The “#” character is a prompt. It’s the shell prompt you get when you are linux “root” (uid 0). If that is news to you, then you are diving into the deep end of the pool here and maybe that’s not a good idea. Why didn’t you just try running some commands there? They would have worked, although it’s likely that your current working directory is not in the right place and you’ll have to find the assignment subtree as Tom points out.

The alternative is that you can run linux commands from the notebook itself. Just insert a new cell by doing “Insert → Cell Below” and then you can enter commands prefaced by an exclamation point to tell the notebook that they are shell commands instead of python code. Try this:

!pwd
!ls

Hi thank you both for your precious feedback. Thanks to you, I finally found the solution.

For the people like me, who do not know much about linux, here is simply what I did, based on TMosh and Paulinaploalto comments.

  1. From your jupyter workbook assignement opened in broswer, if you click on the jupyter logo, you will get to the files related to the assignment. For example, you might see W3A2

  2. Click on the button new / terminal. This will open the terminal. If there is just a # character, that means that it is a shell prompt “root” (uid0).

  3. From there simply find the course material directory.
    You can use the following commands to navigate:
    cd / : this will get you back to the root directory
    ls / or dir : this will list the files contained in a directory
    ls * : this will list the content of diretorie and subdir

So if you type ls * you will see that there is a there is a directory called tf and within it a subdirectory called W3A2

To work at this subdirectory level just write
cd /tf/W3A2

  1. I could not download a tar file from the whole W3A2, because the browser would not allow it due to size limitations. Therefore, I dowloaded manually the different files from the assignment. Except data, because there are lots of photo and it would take ages to do it manually.

  2. For data, I created two tar files:
    From the terminal, I worked at the data subdir level:
    cd /tf/W3A2/data

From there, I made 2 tar files:
tar -czf CameraMask.tar.gz W3A2
tar -czf CameraRGB.tar.gz W3A2

  1. Leave the terminal get back to the jupyter folder and manually dowload both tar file. CameraMask.tar.gz could be dowloaded without any problems, but CameraRGB.tar.gz could not be downloaded (size too big)

  2. Then back to the terminal to split this CameraRGB.tar.gz into smaller downloadable packages. I wrote this, based on previous Paulinaploalto post.

split -b 50m CameraRGB.tar.gz myCameraRGB.part

  1. After this, leave the terminal to go back to your jupyter files, there you will find smaller packages present in W3A2/data that can be manually dowloaded.

  2. To reassamble the file
    On linux or mac:
    cat myTarFile.part.* > myTarFile.tgz
    tar xzvf myTarFile.tgz
    On windows:
    type myTarFile.part.* > myTarFile.tgz

Hope this help,
Manu

That’s great! The one other thing to say is that for Windows users, you’ll need to either use the linux subsystem of Windows (if you’re on W10 or later) to find the tar command to unpack the tar file or you can download an “archiver” that knows how to decode tar files. One that I’ve used in the past is 7zip. I haven’t looked lately, but it used to be free. Just google “7zip”. Or google “unpack tar file on windows” and you may find other alternatives.