Linux Commands Examples

A great documentation place for Linux commands

install

copy files and set attributes

Synopsis

install [OPTION]... [-T] SOURCE DEST
install
[OPTION]... SOURCE... DIRECTORY
install
[OPTION]... -t DIRECTORY SOURCE...
install
[OPTION]... -d DIRECTORY...


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
source
            
make install INSTALL=${INSTALL_ROOT}/usr
0
source

Swap partition size for 4GB RAM

Is it still necessary to reserve a partition for swapping? I thought nowadays this also works on a file on the system partition. And then I suppose you can easily change the size if you would insert more memory or if you think you don't need that much swap space.

Edit: Here's how that can be done (starting from linux 2.6 kernel).

0
source

Make a bootable usb to install Windows XP from Linux

Have a look at UNetBootIn. This should do the trick.

0
source

Is it possible to speed up ./configure?

There are many types of ./configure scripts. There are popular tools (autconf being one of them) to aide a developer in creating a ./configure script, but there's no rule that says every developer must use these tools, and then even among these tools, there can be wide variations in the way these scripts are constructed.

I'm not aware of any popular ./configure scripts that can be run in parallel. Most of the scripts built by popular tools do at least cache some or all of their results, so if you run it again (without doing a 'make clean' first, anyway), it runs much faster the second time.

That's not to say it couldn't be done... but I suspect there's little motivation for the people working on autoconf, for instance, to do that, since for most packages, the configure phase is very quick relative to the actual compilation and linking phases.

0
source

Where is a typical Linux program installed

  • Most programs follow the Filesystem Hierarchy Standard (man hier): libraries go to /usr/lib, configuration files to /etc, static data to /usr/share, and so on.

    Some self-contained programs put all data in /opt/<program>/.

  • .deb/.rpm packages are not supposed to be unpacked manually – they should be handled by the apropriate program, dpkg or rpm.

    If you have only the source code in a tarball, you must extract it to a temporary location (somewhere to /tmp or $HOME). The rest, including installation is usually handled by the Makefile (by running make install); see FHS above.

0
source

How install office 2010 under Wine in Linux Ubuntu?

Looking at: http://appdb.winehq.org/objectManager.php?sClass=version&iId=17336

It shows that it's actual un-doable, You will not be able to install office 2010 in Ubuntu, OpenOffice or LibreOffice are the only ones.

0
source

How is install -c different from cp

The install utility, at its base, is a fancy cp. But as a tool specifically do installs it contains a few features that cp doesn't. My /usr/bin/install from GNU coreutils not only copies, but also can change perms/ownership as arg flags (saving chgrp, chown, chmod invocations) an option to strip debug info (saving a strip invocation) and also some mojo for SELinux contexts.

It just provides convenience actions useful for software installs. None are life changing, all are useful, and make your scripts cleaner.

0
source

How can I install DropBox without root privileges?

You don't give your distribution, but since you aren't installing as root it's probably not important. (The binaries are meant to be installed system-wide, so unless you can convince your system administrator to install the package, you'll need to compile and install to your home directory.)

Essentially, Dropbox's Linux client is two parts: a daemon, dropboxd, that provides a "per-user closed-source daemon process that makes sure your $HOME/Dropbox directory is properly synchronized", and a client that connects to the daemon and provides information. The binaries provided supply a Nautilus plugin for Gnome, although there are also CLI clients available.

You'll want to refer to Installing to a Text-Based Linux Environment, which includes links to the daemon binaries for 32-bit and 64-bit systems. If you don't need the Nautilus plugin, make use of the official Dropbox CLI script or a user-created alternative CLI script.


If you really want the Nautilus plugin, you'll need to build it from the source package, and install it to your home directory.

Untar the source package:

tar xjf nautilus-dropbox-0.6.1.tar.bz2 
cd nautilus-dropbox-0.6.1

Run the configure script; add the options you wnat, but you'll need the --prefix= option:

./configure --prefix=/home/<username>

If this fails, you'll probably need to grab headers for the libraries needed to compile the program: GTK 2.12, GLib 2.13, Nautilus 2.16, and Libnotify 0.4.4 (minimum versions; if you can match up the version provided by your system, you can avoid the actual compilation and just grab header files to install to your own ~/include directory).

Build and install the binaries; they should be installed to your home directory (eg ~/bin, ~/share, ~/lib, ~/man, etc).

make
make install

Note this is the basic process, and you may need to work through them a few times depending on what libraries and headers are available on your system. All of these steps are possible without root access, but you will have to modify any installations to install them to your home directory instead of system locations like /lib or /usr.

If you run into trouble, your best bet for finding help is the Dropbox forums.

0
source

How do I install a .deb file in Ubuntu

dpkg -i [name of file].deb

You might need to add a sudo command in the front to elevate the command to superuser level.

0
source

How to install VIM on Linux when I don't have root permissions?

make install DESTDIR=~/.local, then make a symlink in ~/bin to ~/.local/bin/vim.

0
source

How can I duplicate my Linux environment if I am migrating to different hardware?

You can backup your home, and restore it to the other machine. This cannot fully fulfill your need, but it will restore all the configuration. You have to reinstall the packages yourself, though.

0
source

Install linux to USB flash drive - "normal" not "live"

absolutely. In most cases (depending on your linux of choice) you can simply boot off of a live CD and do a full install directly to your thumb-drive. You will probably be required to format your pen-drive in ext2/3/4 prior to installing, but still should be doable. The trick will be finding out if your bios will support booting from the thumb-drive.

0
source

How to ReUse Ubuntu APT

Yes, you can do that. apt-get will look at cache folder first, and if the version of the package you wanna install is the same with the cache version, apt-get will use the cache version without going to internet

0
source

Creating a Windows XP installation flash drive in linux

Since you already have a windows .iso, you may be able to make use of a tool like UNetbootin to make a bootable usb drive from the cd image.

0
source

Why do I need to explicitly specify the current directory with "./" when running "./configure"?

Only directories listed in $PATH are searched for commands to execute. The current directory is never included in $PATH as a security precaution, hence you have to specify it explicitly.

description

This install program copies files (often just compiled) into destination locations you choose. If you want to download and install a ready-to-use package on a GNU/Linux system, you should instead be using a package manager like yum(1) or apt-get(1).

In the first three forms, copy SOURCE to DEST or multiple SOURCE(s) to the existing DIRECTORY, while setting permission modes and owner/group. In the 4th form, create all components of the given DIRECTORY(ies).

Mandatory arguments to long options are mandatory for short options too.
--backup
[=CONTROL]

make a backup of each existing destination file

-b

like --backup but does not accept an argument

-c

(ignored)

-C, --compare

compare each pair of source and destination files, and in some cases, do not modify the destination at all

-d, --directory

treat all arguments as directory names; create all components of the specified directories

-D

create all leading components of DEST except the last, then copy SOURCE to DEST

-g, --group=GROUP

set group ownership, instead of process’ current group

-m, --mode=MODE

set permission mode (as in chmod), instead of rwxr-xr-x

-o, --owner=OWNER

set ownership (super-user only)

-p, --preserve-timestamps

apply access/modification times of SOURCE files to corresponding destination files

-s, --strip

strip symbol tables

--strip-program=PROGRAM

program used to strip binaries

-S, --suffix=SUFFIX

override the usual backup suffix

-t, --target-directory=DIRECTORY

copy all SOURCE arguments into DIRECTORY

-T, --no-target-directory

treat DEST as a normal file

-v, --verbose

print the name of each directory as it is created

--preserve-context

preserve SELinux security context

-Z, --context=CONTEXT

set SELinux security context of files and directories

--help

display this help and exit

--version

output version information and exit

The backup suffix is ’~’, unless set with --suffix or SIMPLE_BACKUP_SUFFIX. The version control method may be selected via the --backup option or through the VERSION_CONTROL environment variable. Here are the values:
none, off

never make backups (even if --backup is given)

numbered, t

make numbered backups

existing, nil

numbered if numbered backups exist, simple otherwise

simple, never

always make simple backups

copyright

Copyright © 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

reporting bugs

Report install bugs to bug-coreutils[:at:]gnu[:dot:]org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report install translation bugs to <http://translationproject.org/team/>


see also

The full documentation for install is maintained as a Texinfo manual. If the info and install programs are properly installed at your site, the command

info coreutils 'install invocation'

should give you access to the complete manual.


author

Written by David MacKenzie.

How can this site be more helpful to YOU ?


give  feedback