Live coding discussion

Those are bash bindings. They should be the same for zsh. They’re actually borrowed from an editor called emacs, and are used for most command-line programs on Linux and Mac nowadays. For instance, they should work fine in ipython too.


I’ve posted the walkthru-1 HD recording, link to session chat thread, and link to next session Zoom in the top post of this topic.


Thanks for sharing these shortcuts. Just thought of adding some useful WSL shortcuts too:

Ctrl+Shift+1 - Open shell set for default profile

Ctrl+Shift+3 - Open shell listed as number 3 in WSL

Alt+Enter - Enter terminal in full screen

Alt Shift + - Open a new vertical pane

Alt Shift - - Open a new horizontal pane

Ctrl Shift w - Closing a Pane


Two fun and useful things I have encountered today while working associated with what we covered in the walk-thru that we might want to consider covering in the next session are

  • how do you “reload” bash after making changes to .bashrc
  • how do you create an “alias” that can take a parameter? for instance, with docker one might want to be able to specify an image one wants to run which needs to precede the command one wants to be run in the container when it starts

EDIT: it also seems to be very useful to be able to pass default value for the parameter if it is not specified


The recording link is linked back to the post not the video.

The ‘this playlist’ link is working well, not the ‘Recording’ link.

Yeah, I suspect Jeremy might have accidentally placed the wrong link, but I edited and fixed it. :slight_smile:


What is your current Windows backup regime? Do you see the penguin in the bottom of Windows Explorer? Maybe you can take files from there into your current backup?

At least for me, everything in my Linux home dir that I want to keep, is in github repos.


WSL can access your C: drive … at least that’s how I do it. I just ‘cd’ to a windows folder on my C: drive (made available as /mnt/c in I think?) and put files there, and I can get to it from windows explorer side. If your dropbox folder is c:/dropbox you should be able to see it from within WSL as /mnt/c/dropbox if I’m not mistaken.

1 Like

Just be aware that accessing Windows directory files from WSL is far slower than accessing them from WSL.

BTW you can backup your whole WSL distribution like so

1 Like

To add to this, it is a fun activity to create your own scripts (like the scripts we learned about in the walk-thru) for setting everything up that you might need on a new machine.

It changes the experience of setting up a new machine from a horrible chore to something you barely think about :slight_smile:

I have config scripts that I use myself here. Jeremy has a much nicer repo here. The rest is getting backed up automatically as I work on stuff to github, but that is nearly an afterthought.

That bit from Jeremy’s repo is crucial I feel:

I suggest you create a fork of this, so you can modify it.

The approach used here is from How to store dotfiles | Atlassian Git Tutorial

Well, both these bits :slight_smile: The second part actually describes how the method works, so it is really cool, though I don’t remember when was the last time I actually updated my dot files like that :smile: There is just so much value in them getting pulled at the start.


I am sure we have a lot of goodies planned to cover, so I am not listing them here (tmux, for instance), but on things directly associated with what was covered in he walk-thru, three things that we might want to consider covering next might be:

  • we have seen a lot of python stuff getting installed, but what does it mean for a library to be installed?
  • what is a wheel? is there something we should know about or not necessarily so at this point?
  • how do you “install” your own stuff? say you write a script or a python program and using the shebang (!#) you tell your computer what to run it with and make the file executable (chmod +x `) But how do you “install it” so that you can run it from anywhere in the file system?

And on navigating the file system:

  • the cd without anything after that we covered was cool!
  • I am not sure if we covered ~?
  • maybe pushd and popd?

BTW these are just loose thoughts, if none of this is helpful then no worries :slight_smile: Just thought I’d throw it out there in case it might be helpful (there is a high chance this might not be the time to discuss the more elusive aspects of what is for instance, in the interest of first learning to play the whole game)


An alternative that I found useful was to backup my entire home directory on WSL (/home/<wsl-username>) and Windows home directory (/mnt/c/Users/<windows-username>) using borgbackup to an external drive. For the windows user directory I also exclude /mnt/c/Users/<windows-username>/AppData/Local. The advantage of using borgbackup is that it compresses and deduplicates the files it backs up, resulting in a smaller backup file. I can also mount a particular backup checkpoint as part of the filesystem, so it can serve as a coarse version control system, even for those files I didn’t intend to version.


1 Like

I wrote a blogpost on Installing Python packages and setting a proper environment for Datascience. This is based on notes I had written while attending Fastai walk-thrus session conducted by Jeremy on Introduction to the terminal. How to install Python and libraries. Do check it out:


Hi, everyone. This walkthrough is exactly what I need. I have no coding experience, and used fastai as a springboard to learn Python, Linux, etc. It’s been a tough slog, if I’m being honest. It’s often the issues not pertaining to fastai specifically that slow me down.

Over time, I’ve installed a Ubuntu distribution and created several virtual environments to work in using a full Anaconda distro. I’ve taken several data science courses from Coursera. These are often old and need specific environments to work. I’ve also had to apt-get some things into the system to get them to work. So now I have an (older) Unbuntu version with several environments and system versions of things like Python and Jupyter notebooks. Watching the walkthrough, I notice that Jeremy is encouraging a “fresh” environment with new installs for Python, Jupyter, mamba, etc. I’m updating to Windows 11 now, and I could uninstall and reinstall Ubuntu, but I’m concerned that I’ll make my older files unworkable. It’s not the end of the world to lose them, but I’d prefer not to.

Long way of asking whether there is a way to create the “fresh” environment with all of the versions of everything that Jeremy recommends (especially at the level of the shell) without losing the functionality of what I have? I had the idea of creating a new user on Ubuntu. Will that solve the problem, or does it maintain the same installations of, for example, anaconda on Ubuntu?

The other choice is to copy the files, uninstall and reinstall Ubuntu using Windows 11, and start fresh. I’ll lose some of the functionality but I have the notes which is most important. It just really seems inelegant.

Sorry if this question is basic. I’ve read through the other comments here and if they answer my question I’m not recognizing it.

This is an incredible course and resource. I hope to join you in person for these walkthroughs at some point, but timing is always hard…


Just watched a bit further. Looks like removing anaconda directory will do the trick, followed by installing mamba? It won’t change the system files in Ubuntu but I guess that doesn’t matter?

1 Like

You may find these useful…


Hi Mark, it depends what kind of Ubuntu environment you currently have. Is it Ubuntu on an actual machine? or Ubuntu in a WSL install in windows. If it’s an actual machine you could try to make an ISO out of your ubuntu install and then just restore it to a virtualbox VM. If it’s WSL based, then you could probably look into what @bencoman suggested.

BTW, if you go the WSL route on windows11, just note that you can have multiple versions (“Images”?) of Ubuntu running on WSL. So you could probably import your older image into an Ubuntu version on your new machine’s WSL and then create another brand new WSL based Ubuntu environment where you can follow Jeremy’s walkthroughs.

Personally, I’m a serial course taker myself, and like you mentioned, those environments can get old because they use older versions of everything … so, I periodically go through these old directories and find that most of that stuff is not that useful to me. The only thing that’s useful is the code that I wrote and use git to keep a copy of that anyway. In your case, you might just want to run multiple Ubuntu instances and port your older ubuntu to your new Win11+WSL and then use another Ubuntu install for fastai 2022 stuff.

All the best!

1 Like

Thanks @mike.moloch and @bencoman.

I am using WSL.

I used your tips to create an image of Ubuntu, then deleted and reinstalled. The files are really just Jupyter notebooks with my own notes in them and will mostly work fine with the new install as long as I don’t try to run actual code. They’re more my “notes”. Not really appropriate for github since they are Coursera’s notebooks.

Actually had to still do a manual install of Ubuntu despite upgrading to Windows 11 and deleting old version. Did everything Jeremy did, but still didn’t quite work. Nothing ever seems to go exactly right with Linux, packages, etc. That’s why this walkthrough is really valuable for me.

Really appreciate the help.

1 Like