How to execute typical Linux commandw on Torizon

I’m trying to run “sudo apt-get libcurl4-openssl-dev” on the COM running on Torizon.

I can login to Portainer successfully. However, I cannot figure out how to obtain a Linux terminal window to run typical Linux commands.

I tried doing it by connecting to COM through SSH/ PuTTY client. In PuTTY, as I run -
#sudo get-apt libcurl4-openssl-dev
I receive -
sudo: apt-get: command not found

As I run -
#docker apt-get libcurl4-openssl-dev
I receive -
docker: ‘apt-get’ is not a docker command

What do I do to have this Linux command executed in Torizon?

Greetings @MichaelFang,

You need to use the containerization feature of Torizon. The apt package manager is distinct to Debian/Ubuntu type systems. Torizon isn’t based on Debian. However using containers you can pull down a Debian environment and run commands in that. Please see here for more information: https://developer.toradex.com/knowledge-base/debian-container-for-torizon

Furthermore the Quickstart guide for our modules also go over this idea: https://developer.toradex.com/getting-started

Best Regards,
Jeremias

The link your provided lead me to this site
https://developer.toradex.com/knowledge-base/deploying-container-images-to-torizoncore.

It seems to me, in order to have apt- manager available to me, I need to take the CLI path, is that right?
and from the flowchart in the link above, CLI path is exclusive OR with IDE path during development.

So far, I have practiced my applications using IDE(Visual Studio Extension for TorizonCore).
If I want to stick with IDE, is there a way I can find out whether the extension has packed with cUrl library and anything close to it? The extension on my VS2019 is 1.3.0.

Thanks,

Michael

It seems to me, in order to have apt-
manager available to me, I need to
take the CLI path, is that right?

If you want to interact with apt on the CLI then yes. Though ultimately you want to create a Dockerfile with or without the extension that uses apt. Since you say you’d like to use our VS extension I’d suggest the following article: https://developer.toradex.com/knowledge-base/c-and-c-workflow-example

I think this will help clear up any misunderstandings with how the development workflow works with Torizon.

If I want to stick with IDE, is there
a way I can find out whether the
extension has packed with cUrl library
and anything close to it?

I’m not sure if I understand your question here fully. Are you asking about how to include the curl library in your end application?

Best Regards,
Jeremias

Are you asking about how to include the curl library in your end application?

Yes. Ultimately I want to include the curl library in my end project.
What I’m trying to accomplish is to have a HTTPS client code in C using curl in my end application. A friend of mine accomplished similar application in Raspberry Pie and I’m trying to mimic what he did.

  1. First he installs the curl library in the Debian by running “sudo apt-get libcurl4-openssl-dev”.
  2. In his application he includes curl by having “LIBS = -lcurl” in Makefile.

However, my application will have a lot more than HTTPS client code and I want to stick with VS IDE if possible. Thanks!

I highly recommend going through the article I linked above. It covers such thing as adding packages/libraries to your application container as well as linking to these libraries.

Best Regards,
Jeremias