Hi. In this video we will learn how to use Jupyter Notebook Terminal.
For those of you which are familiar with Linux,
this video will be a little bit boring, but I have to explain the basics.
For those of you who came from Windows,
maybe you know the command line or PowerShell.
They are very similar with slide differences,
but is the terminal,
terminal as you interact with the system in a command like fashion?
And why is it useful and important for our work?
Just to mention a few, uh,
we can install packages and manage our Python environments.
We can monitor the system,
we can execute scripts and uh, schedule their execution.
We can run the Python console directly from the terminal.
It is a very useful tool for debugging.
And we can work with system files directly in addition to the work folder,
which we have mapped.
And basically we have access to the whole system in the container,
not only the mapped repository folder.
Now I will show you a few basic commands for introduction and those which I use
in my daily work. Now let's, uh,
start our Jupyter and our terminal.
Go to file, stop, click new terminal.
And what do we see here? We are currently using, uh,
the Anacondas, uh, base environment.
Anaconda is a Python environment and a package manager.
We'll learn the basics, uh, how to work with Ator.
Then we see that we are locked as the Jovian user
and this is the name of the system.
Now I would like to see more information about our user.
We can do this with the command id. We
see here his ID and the groups where he belongs to.
Now I would like to see what kind of reux version we are running in the
container. We can do this, uh,
to see the contents of the file called uh,
os release in the E T C folder.
And we can print the contents of a file with cat command.
And this is the way how to do it.
We see that we are running two version 22 with the long-term support.
Now to navigation, let's print our working folder,
p w d command we can use for this.
Now let's uh, print the contents of our folder.
We can use ll command for this.
We see here a bunch of hidden folders, uh, together with our work folder.
Let's navigate there. We can use the CD command.
This is a shortcut for change directory.
Now let's navigate to the folder for module number three
and Linux terminal has auto completion. So now press up.
Let's print the contents of the utilities patent script.
I have mentioned that we can use the cat command for this
and we see contents.
Now let's create a new file.
We can use the cat command for this as well. And this is the syntax.
We can now input the contents line by line.
And when we are finished, press Ctrl D.
Let's, uh, check the file if we have it done correctly.
Yes.
Now let's upend a new line to this file without opening it.
We can do this with the eco command and this is the syntax.
Now let's check if we have it done correctly.
We can move through history of our commands with arrows up and down.
Yes, it's correct.
Now let's create a new folder
we can use for this meg directory command.
Yes, and it has been created.
Now let's copy the newly created file into the newly created folder.
We can use the copy command for this and this is the syntax.
Now let's check the contents of the new folder
and the copy was successful.
Now let's remove this file.
We can do this with the RMM command.
And now let's remove also the folder.
We can do this also with the RMM command,
but we have to input the R parameter, which means, uh,
recursive.
And this means that the contents of this folder will be removed,
file by file
and the deletion of the file. And also the folder will successful.
Now I will show you a few other commands, which I use very frequently.
Probably the most frequent command, which I use is the historic command.
This command, uh,
lets you see history of all your commands and,
but is nice about it that, um, you see also its numbering
and you can execute, uh, the command, uh,
based on the number of this command. And this is the way how we do it.
For example,
I would like to execute command number
31 where we printed the information about our system,
right?
We can also filter the output of the historic command.
And this is the way how to do it.
This is also very useful.
Now I am also very curious about, uh,
the Python version, uh, which we are using.
And I would like to also see
where is the Python executable
we can use for this, uh, the beach command.
Okay. And the last command,
which I would like to show you is the top command. And with this command,
you can monitor the system resources.
You can exit with queue or Ctrl C,
then you are in doubt on how to use some command.
You can use help and this is the way how to do it. For example,
I would like to see help for the copy command.
And here, uh,
we see all the information regarding parameters and how to use this command.
You'll find all the commands which we used here in provided, uh,
P D F file.
That was it for the terminal. And in our next video,
we will install few Jupyter Notebooks extensions.