title | keywords | sidebar |
---|---|---|
Terminal |
home_sidebar |
NB: Windows users should look at the guide at the end of this document to install a terminal. Mac and Linux users already have one.
It’s a black screen that allows you to interact directly with your computer with some lines of code.
Write in the terminal “cd” and the name of the folder you want to access.
On Windows, you can access 'C:' or 'D:' by adding the prefix /mnt/ :
Write in the terminal “cd ..”
In order to move faster and avoid typo errors while navigating between folders, you should use Tab. You just need to start to type the file or directory name and once you wrote enough for it to be identified, you can press Tab.
If there is only one folder or file that starts with the characters you wrote, the name will be autocompleted. If there are many that start that way, you can press double Tab to list them; in order words, it is like using the command "ls" .
Copy and pasting depends on your Operating System.
- Windows: The commands to copy and paste in your Linux App in Windows is SHIFTRight Click and then select 'Paste' or 'Copy'.
- MacOS: The commands to copy and paste for Mac are CMD C and CMDV
- Linux: The commands to copy and paste for Linux are CTRLSHIFTC and CTRLSHIFTD.
Copy pasting on Windows like in Linux: If you want to be able to CTRLSHIFTC and CTRLSHIFTD in your Linux App in Windows this is possible. You should first open your Ubuntu App, right click on the empty part of the title bar and click at 'Properties'. Then, mark “Use Ctrl+Shift+C/V as Copy/Paste” and then click on "Ok". For more information see here.
Write in the terminal "mkdir” and add the name of the folder.
By writing “pwd”, the terminal will tell you where you are; in other words, the file directory you are working on.
Write “ls” in your terminal it will list your files.
Write in the terminal “cp” with the file you want to copy and add the final destination folder where you want to paste it.
Go to this url: https://github.com/fastai/fastai, and copy the git url. Click on the number 1 and 2 to have it on your clipboard.
Then, in order to clone the fastai repo, use the friendly command "git clone” and then paste the url your terminal.(If you're using Colab, you need to add "!" before the command to use Shell)
Enter the "/fastai" directory you've just cloned, when your repo is up-to-date, you should see this message.
If there are new missing files, you wil see this.
One more thing, if you want to update conda, you should write this in the terminal "conda update conda" and you are done.
For Windows users, you will need to install a terminal with the bash shell (Mac and Linux already have one). Note that this is only necessary if you don't use one of the ready-to-run Jupyter options for the course.
We recommand Windows Subsystem for Linux (WSL) and the Ubuntu App for Windows 10 users. To install it, note that you first need to activate WSL with the following steps:
- Open the Control Panel
- Select 'Programs'
- Click on 'Turn Windows features on or off'
- Scroll and click next to 'Windows Subsystem for Linux'
- Reboot your computer
Once this is done, you just have to install Ubuntu from the Windows Store and launch the app. Note that this is a full Ubuntu installation running inside Windows! So when installing software for use in this environment, you should follow steps for Ubuntu, not for Windows. It's very useful to be able to copy/paste with keyboard shortcuts in your WSL terminal; here's how to enable that:
- Right click on the title bar
- Click “Properties”
- Check “Use ctrl+shift+c/v as Copy/Paste”.
For older versions of Windows, we recommend installing Cygwin. If you're using Google Cloud, you should install the Windows version, not the Ubuntu version.
Many thanks to Kevin Martell for writing the first draft of this guide.