Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I am new to linux and trying to understand.....
I have got a software package for CentOs7 which I need to install (according to the manual) by calling ./install.sh which is in my current directory, when doing so everything works OK.
AFAIK, in Linux ./ means current directory, so why am I getting install.sh: Command not found when just calling install.sh (i.e. without ./) from the current directory?
In Linux, UNIX and related operating systems, . denotes the current directory. Since you want to run a file in your current directory
you need the ./ bit to tell the shell where the executable is.
So, ./install.sh means run the executable called install.sh that is in this directory.
PS: If your current dictionary is registered in $PATH, you don't need to use ./install.sh just install.sh is enough
If you want to just call install.sh or any other script with ./ then the same should be in the bin folder. If the script is in any other directory, then ./ is must.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
So I wanted to copy a folder from a remote server to my local computer. I am using WSL (Windows Subsystem for Linux)/ Ubuntu.
First, I ssh into the server using ssh user#host.
Then I wrote the scp command which is scp -r user#host:/var/www backup-9-feb
But now I cant find this backup-9-feb folder, please help. Unfortunately, I forgot the name of the folder too. This is just an example.
After I executed these commands, A long list of files with there paths were shown
You don't need to ssh into the server to use scp. You want to do the following on your computer: scp -r server_user#server_host:/var/www backup-9-feb. This will copy (recursively) the directory /var/www of the server to the directory where you ran this command on your machine.
Note: scp is going to be deprecated so you probably want to start using an utility like rsync (works similarly).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am playing around with an open-source software, FSL. I have no problems running it on my Mac, where I am able to simply start it by typing fsl in the terminal.
However, I have no idea how to start the software on our school's HPC server. After logging into the school server via SSH, I type fsl as usual, and then
If 'fsl' is not a typo you can run the following command to lookup the package that contains the binary:
command-not-found fsl
-bash: fsl: command not found
Then, I navigate into the FSL installation directory (/data/apps/arch/Linux_x86_64/fsl/5.0.6) and type fsl. Still the same error. I have also tried
module load /data/apps/arch/Linux_x86_64/fsl/5.0.6
But this error occurs.
utility.c(2360):ERROR:50: Cannot open file '' for 'reading'
utility.c(2360):ERROR:50: Cannot open file '' for 'reading'
...
How should I load it properly and ultimately run it?
You have to call the executable with the correct path. You may either
cd to the directory containing the executable
prefix the executable's name with the path ./fsl
or (if you intend to use the executable frequently):
add the executable's path to your PATH-environment variable (export PATH=$PATH:/path/to/the/folder/containing/the/executable)
use the executable's name to call it (fsl).
or you place a symlink to your executable somewhere the $PATH already points to:
Check $PATH with echo ${PATH} (outputs a colon-separated list of directories the command line processor will look for your call)
If there is ~/bin in there, place a symlink: ln -s /path/to/your/executable/fsl ~/bin/fsl.
The command line processor will search the directories listed in ${PATH} for an executable called somecommand if you type somecommand.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I want to automate a process of downloading a binary file from a server (HTTP) and then install it on either Solaris or Linux servers.
I use wget command followed by executing the binary file as root user.
Can we combine these two steps?
put both commands into a single script that gets executed by root
You can do
wget url | command-to-install
However, if this is a tar folder and you know how to install, you can write a shell script to do it. e.g
wget url
tar xvzf archive
./configure
make
make install
and run it as root e.g sudo ./installscript.sh
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have vim 7.0 on my server machine and I don't have root permissions. So, I have extracted Vim73 to my home directory and installed using the following command without having any errors.
./configure --prefix=$HOME && make && make install
But still if I open vim it is showing the older version.
How can my .vimrc file read the latest version installed from local user (home)?
You need to add your home to your path:
export PATH=$HOME/bin:$PATH
If vim installs shared libraries, you'll also need to add your local libs path to your LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=$HOME/lib:$HOME/lib64:$LD_LIBRARY_PATH
Choose lib or lib64 depending on what's present on your system.
Alternatively, call the binary with its absolute path:
$HOME/bin/vim
Create an alias in your .bashrc or .zshrc, ...
alias vim="/path/to/your/vim"
Configure the PATH variable to include the path to the locally installed vim. Or create an alias alias vim = /path/to/local/vim.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm new to linux. I have Ubuntu and I would like to run a .run installer in my Downloads folder. The name of the run file is "xampp.run"
I've read that you first have to run
chmod +x xampp.run
to change mode to installer and then run
./xampp.run
to run the installer. However, nothing happens when I try these. I'm running from root#ubuntu.
This is what I've done in my shell.
Download and install XAMPP for x86_64 Linux.
.run files are executables, not unlike windows-installers(M$)
You may need root permission to execute the file.
su to root, and enter the root password, or use sudo before your command
then either cd to the directory where the .run file is
or use "absolute addressing" and
type in a terminal shell...
sh (filename).run
Generally you can evoke a help screen (not always) by adding --help on the end.
sh (filename).run --help
(this may give you options to apply to the install script.)
Hope this helps
You should download 64bit version of Xampp.
this steps is for ubuntu user
sudo chmod 755 xampp-linux-1.8.2.0-installer.run
sudo ./xampp-linux-1.8.2.0-installer.run
(This will extract all the packages to the /opt/lampp directory)
Then start the service
/opt/lampp/lampp start