Hi im not understanding the services concept
what is /usr/bin/python and /opt/code/my_app.py
what is is basically means
and one more thing i have forgot my ubuntu sudo root password is their any way to reset the password , kindly share me the details regarding this .
Hello @ramkumar,
Here we are creating a Service, with the name my_app, where we can invoke from anywhere without having to find out the command to use, the path of the python3 compiler/interpreter, or the path of the my_app.py program. We can simply startup / invoke the service, bu its service name.
/usr/bin/python3 /opt/code/my_app.py - This is the cli to invoke python3 and start execution of the python program my_app.py.
This above CLI will be mentioned in the ExecStart of the my_app.service file.
my_app.service:-
[Unit]
Description=My python web application
[Service]
ExecStart=/usr/bin/python3 /opt/code/my_app.py
These are very interesting areas, which you will be able to pick up very quickly if you go through ‘The Linux Basic Course’
https://kodekloud.com/courses/enrolled/873064
It covers a lot of Unix essentials that you will require to work on docker and kubernetes.
The services are demonstrated in the section - Service management with SYSTEMD.
Also the basic areas like ‘Linux Core Concepts’ - providing details on boot sequence, file type, filesystem, etc can be found.
Even after having some experience in developing on Unix/Linux environments - I am going through these basic concepts (fast pace) as a Revision.
Also wrt to the sudo password - the default password is the login password.
Regards,
Mashiur Rahman