I want to install a .deb file into a specific directory. How can I make that with command line :?
That is not supported.
And what about tar.gz :?
Tar.gz are normal compressed archives. You can extract the files with the normal file archiver like ark.
Just one further notice. Be aware that those tar.gz archives are mostly used for shipping source code of applications and not only binary (1 file to click to execute) files.
So when it is a source code you need to compile it first (create binaries out of the sources). Thats not trivial especially for beginners.