N
N
Nikita Mikaev2016-03-23 21:11:58
linux
Nikita Mikaev, 2016-03-23 21:11:58

What are console utilities written for under linux?

In general, I came up with the idea of ​​​​writing a console translator based on the Yandex API, wrote a prototype in Python. But the problem is that I would like the ability to install the program on linux distributions that do not have Python.
How are things like this usually implemented? For example, how to make the program available for execution from any folder? For example, like curl/wget, we can run them from any folder by simply writing wget in the console.
And if you write in C / C ++, advise a normal one for working with the network. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
VovanZ, 2016-03-23
@VovanZ

On anything.
In order for the "program to be available for execution from any folder", it (or a link to it) simply must lie in any of the folders specified in the PATH environment variable. (and this has nothing to do with the programming language, etc.)
PS Where did you get the Linux distribution without python? What prevents you from installing python there?

Z
Zhbert, 2016-03-23
@Zhbert

Write on anything, python is quite suitable for this task. Then just put it in PATH, and specify the python in the dependencies when you build packages for distros. Well, or in the makefile you will indicate if you will distribute in the form of sorts.

K
kale, 2016-03-23
@kale

Write a bash script, place it in /usr/bin. All.

A
abcd0x00, 2016-03-24
@abcd0x00

For example, how to make the program available for execution from any folder?

It needs to be installed. And to install, there must be an installer. You can use make for this - it's a classic.
make
sudo make install

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question