I have a little problem extracting or making any files in root directory.
I’d like to extract invoicing software to /opt and /usr directory and run the software from there. It’s possible only as root
What’s the tar command to do it while I’m logged as root in terminal?
Thanks in advance.
So, you have not really explained why you need to extract any files to the /opt or /usr folders? When you install a program, such as using YaST / Software Management, you do so as a root user, but from a standard user login. That just means when you run YaST, you are required to enter the root user password, for it to run and allow access to its many features.
Even if I was to compile a program from source and install the application, I would place the source files in my home folder. For instance, to extract (un-tar) files that I down loaded into my /home/username/Downloads folder manually in Terminal I would do the following:
Open up a Terminal session such as Konsole, if you are using KDE and type:
tar -xvf achive_name.tar
Anytime you want to copy a file to a folder owned by root, you must first become root. But be careful here, as root you can do anything BUT, it does NOT sound like you really know what you are doing. To become root in terminal Open another terminal session and type:
type command that needs root permissions here
When you are root, the terminal prompt will turn red, to remind you what user level you are at. So please be careful.
Well. When I try to run a bin file from the /usr/bin folder extracted off tar file into home directory, It asks me what program should opensuse use to open it…
If it was in opt and usr folder, I think it would run like any other program.
Or maybe I’m wrong with that? I always enter as root in the terminal window because I need to run wvdial connection. As the USB modem device needs root privileges to access it, it can be only done in a terminal as root. But ofcourse that’s another story.
Yes. I extracted using the following command:
tar -zxvf achive_name.tar
Your didn’t contain “z” letter after “-”
I don’t really know what does -xvf stand for. I couldn’t find any information google’ing the web.
Overally, the program that has been downloaded has a simple structure - 2 folders packed in a tar file - /opt and /usr/bin. There’s only one binary file in /opt/madar/invoicer.bin As far as I know it should normally run on opensuse.
To get help on tar’s usage use the terminal command “tar --help”. Here are the four following commands:
-v, --verbose verbosely list files processed
-f, --file=ARCHIVE use archive file or device ARCHIVE
-x, --extract, --get extract files from an archive
-z, --gzip, --gunzip, --ungzip filter the archive through gzip
So, for the most part when installing an application in openSUSE you will want to use YaST / Software Management. Once the program is open, just enter the name of the program to search on and if it is there, you can install it with a lot less trouble. In order to increase the number of programs in your archives to look through, you need to add to your YaST / Software Repositories. Here are Web Pages that include URL’s that can be added to increase your software program choices:
Most everyone suggests that after adding in a repository and finding the program you are looking for, to disable the added repository, until you think you need it again in the future. It is possible to have multiple program versions online and having too many repositories enabled can cause something to go foobar on you. In general, you can have as many repositories added as you want, but keep only the original four or five enabled during normal operation. Ask if you have any other questions.
According to the filsystem hierarchy standrard, such apps (which are not managed by the package manager) should be put in /usr/local/bin - but you should give us a link to that app so we understand better what’s it about and how it might run.