Linux/Unix beginner question

Hello everyone. I am supposed to use Ubuntu for my university curriculum and c++. Sometimes I need to donwload Ubuntu programs and only use terminals..I dont know what is configure make and make all ..I dont know how to install ubuntu programs from cmdline only....

secondly it is said ubuntu can execut anyfile but I want to know how?

thankss
configure, make, make install are the commands for building from source. For terminal:

sudo apt-get update
sudo apt-cache search <program_name>
sudo apt-get install <program_name>


To execute any file, you have to install emulators.
Last edited on
make is a gnu tool used to compile code. make will search the current directory for makefile or Makefile, then execute the instructions found in that file.

make install will execute the makefile, and specifically, execute the install recipe which, by convention, copies all files to their correct directories.
http://www.gnu.org/software/make/manual/make.html
make is a gnu tool used to compile code.

more specifically, used to invoke the compiler in often long and difficult ways
will sudo apt-get install work for tar.gz files?
No. You unpack those with: tar -xzf filename.tar.gz

Unix systems do have manuals. You can find out more by running: man man

As for those flags passed to tar, you can find out more with: man tar

This is an online Linux manual page site: http://linux.die.net/man/
Avoid source installs whenever possible. It is quite likely that the (third-party) ubuntu package repositories have the usual programs.

apt-get installs packages that are in special format. There is metadata. That allows the apt-get to remember what it has done and update/uninstall packages too. apt-get doesn't know anything about source install. In worst case a source install overwrites (and thus corrupts) some installed packages.


The configure creates a Makefile that is adapted to current platform.
Avoid source installs whenever possible.

uhhhmmm no. building from source is usually a good idea because it can configure to their system.
Not to mention that the repositories aren't always up to date so building from source it a great way to get the latest release of a tool you need. Also good if the latest source adds features to the tool that help the user.
Last edited on
Avoid source installs whenever possible.

Why ? Often times it is better to just use source tarballs (when you know what you are doing and have a big mug of coffee :D ) because :
1. Repositories are not updated frequently.
2. The provided packages may not be compatible.
3. It is easy.

$ ./configure
$ make
# make install OR $ sudo make install

4. and some more points i cannot think of.

But if you are new , installing from packages is better.
Last edited on
4. and some more points i cannot think of.

exactly. +1
Obviously, if a necessary feature is available only via tar-ball, then that is the only possible solution.

Lets rephrase: Avoid unmanaged installs.

What does that apt-get & kin bring to the table?
http://en.wikipedia.org/wiki/Advanced_Packaging_Tool
Software management

That manager doesn't know anything about your unmanaged installs.


You state that building self configures to your system. Can you be sure that the package management doesn't?

You state that repositories of your distro lack latest versions. Sounds like you don't use a distro that focuses on being the bleeding edge.

You state that packages are not compatible. If this is within single repository, then the repository has serious maintenance issues. If it is due to multitude of third-party repositories that formally package for same distro, but overlap and differ in ideologies, then you have to choose, rather than take everything. How do you find out the incompatibilities anyway? How do you know that your unmanaged install doesn't conflict with something?


Easy? Managed install downloads the package, solves dependencies, and can update those packages for which there are updates. Critical security updates can be on separate channel, so that you know to get at least them.

Sure, you do type about the same amount initially. However, it is easy to type rm -fr / too; it is the followup where the managed system shines. Package manager knows whether the repository has updates. How much effort do you spend on checking that each unmanaged application stays up to date? Why would any distro have package managers and repositories, if unmanaged source installs are so easy and preferable?


Not all tar-balls use GNU autotools. Hence, same routine doesn't apply to every case.

What if your system lacks some library? The configure can either abort with more or less useful message or skip building some parts of the application. The OP would have hard time in both cases.
@keskiverto
tl;dr
You win :)

keskiverto wrote:
What if your system lacks some library? The configure can either abort with more or less useful message or skip building some parts of the application. The OP would have hard time in both cases.

...
me wrote:

when you know what you are doing
me wrote:

But if you are new , installing from packages is better.


EDIT:
okay , you do make some good points.

and let's end this debate
Last edited on
I dont know what is configure make and make all ..I dont know how to install ubuntu programs from cmdline only....


configure and make are for compiling programs from scratch.
configure is the release script to make sure you have all the libraries and prerequisites.
make is the actual make script to invoke your compiler.
Usually make install is configured as well but not always. Sometime you just have to cp.

apt-get is a cmd line app that is a debian precompiled package fetcher from the repositories.
The repositories are just urls in a file. On debian linux systems like Ubuntu it should be in your /etc/apt dir.

dpkg is for installing a downloaded package i.e. somefilename.deb
GET someurl.net/pathtofile > name.deb will do it however learning something like ftp from the cmdline is something more along the lines of the curriculum path.

If you are going to be compiling, you have to install build-essentials
apt-get install build-essentials
Thanks everyone
Topic archived. No new replies allowed.