Questions tagged [symbolic-link]
A symbolic link or symlink is a special type of file that contains a reference to another file or directory as an absolute or relative path. For most operations, symbolic links are transparent and the read or write operations on symbolic link files are redirected to the files that symbolic link files link to.
84
questions
637
votes
8
answers
1.5m
views
How to create a soft or symbolic link?
I am installing p4v in /opt, but /usr/bin is on my path. Is it possible to create a soft or symbolic link for p4v from /opt to /usr/bin, so I can just type "p4v" since /usr/bin is in my path?
570
votes
9
answers
672k
views
What is the difference between a hard link and a symbolic link?
As the title says, I would like to know the difference between a hard link and a soft link created by the command ln. The command man ln does provide information, but does not sufficiently answer my ...
12
votes
1
answer
8k
views
How do I symlink certain directories in /home to an SSD?
In Is a 40GB SSD practical to use for ' / ' Jorge describes how he symlinks things in his /home that would benefit from being on an SSD. How is this done?
I've figured that I need to do the ...
12
votes
1
answer
18k
views
How to use multiple instances of gcc?
I have both gcc 4.7.3 and 4.8.1 installed
But on running gcc --version I get
gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see ...
15
votes
3
answers
3k
views
Nautilus: Visited directory via symlink, now I can't go one level up in the target directory hierarchy
I created a shortcut via "make link" option. When I enter to this shortcut's folder I can't see any folders above it so I can't easily navigate to them.
Is there a way to go one folder up in the GUI? ...
23
votes
4
answers
5k
views
What in /home would benefit from being on an SSD?
In Is a 40GB SSD practical to use for ' / ' Jorge describes how he symlinks directories in his /home that would benefit from being on an SSD. The directories he names are
~/.cache
~/.config
~...
7
votes
3
answers
1k
views
Home directories turned into symbolic links without telling me the reason
it was a normal day for me like any other day and I decided to open my Laptop for work and what I see the first is the following:
Then, I tried to find out what happened to these folders through the ...
214
votes
6
answers
742k
views
How to remove symbolic link
I was trying to create this symbolic link:
sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin
but I accidentally typed:
sudo ln -s /usr/share/php,yad,in /var/www/phpmyadmin
So now I want to ...
78
votes
3
answers
290k
views
Help with creating a symbolic link [duplicate]
I'm confused with how symbolic links work. I hope someone can guide me in the right direction.
I want to put a demo online from our software, which normally only runs locally on a Mac Mini. So I put ...
66
votes
5
answers
46k
views
What is the difference between ln -s and mount --bind?
I am trying to understand difference between using ln -s and mount --bind. In basic scenario I can use both to access one directory from somewhere else. In what scenarios those two will behave ...
17
votes
2
answers
3k
views
How can I stop Nautilus from dereferencing symlinks? [closed]
I use symbolic links to tidy my home folder. This works well in the terminal, since the links create the illusion of normal folders:
In Nautilus, however, the links behave more like Windows shortcuts,...
16
votes
2
answers
35k
views
How can I create an alias so that when I enter "kt" it executes "killall gnome-terminal"?
How can I create an alias so that when I enter "kt" it executes "killall gnome-terminal"?
12
votes
0
answers
3k
views
Symbolic links vs Hard links [duplicate]
I just read the manpage for symlinks, but I still dont get it ... so hardlinks are pointers to the file/dir. Then symlink is a pointer to a pointer? Whats the use of a symlink then? Why/when should I ...
5
votes
1
answer
44k
views
How to use a symlink in Apache Web Server
I Installed Apache2. In the the folder "var/www/html" I created a symlink to a different HDD that holds a number of movie files. My thinking is that it would be easy to access the movies through a ...
3
votes
2
answers
2k
views
Make link open target file, not file at link location
Sorry for the tags. I don't know whih one applies. Please remove not pertaining ones, then delete this line. Or comment, and I'll do it myself.
Background
I want to put a link to a file located in /...
116
votes
5
answers
597k
views
What is a "failed to create a symbolic link: file exists" error?
I'm trying to create a symlink in my home directory to a directories and files on my data partition. I've tried:
~/Documents$ ln -sv ~/Documents/saga /media/mariajulia/485f3e29-355c-4be3-b80a-...
56
votes
4
answers
156k
views
How to find and list all the symbolic links created for a particular file?
I had created many symbolic links on various paths for a particular file or a directory. I want the whole list of created symbolic links paths (location).
Example:
I created symbolic links for ~/...
29
votes
4
answers
148k
views
Symbolic Link: No such file or directory
I created a symbolic Link from a File at "/opt/bladir/bla" to "bla". So "bla" is now in "/usr/bin/bla". But if I want to call "bla" at terminal, there comes the no such file or directory error. I ...
28
votes
3
answers
28k
views
Can symlinks be used in /etc/cron.d/?
I'm trying to implement a configuration mechanism that allows in a certain project to deploy through svn a cron configuration.
I immediately thougt that what I should do is cerate symlinks from /etc/...
24
votes
2
answers
55k
views
force cp to copy on dangling symlinks
Is there any way to force cp (Bash 4.2.5, Ubuntu 12.04) to copy onto a dangling symlink?
cp a-file path/to/danling/symlink/a-file
cp: not writing through dangling symlink `path/to/danling/symlink/a-...
17
votes
2
answers
6k
views
What kind of link to /bin/systemctl is /sbin/reboot?
Stupid question here. I see that /sbin/reboot seems to be a link to /bin/systemctl. However it does not behave as a "simple" link because calling /bin/systemctl is not the same as /sbin/reboot.
Also, ...
14
votes
1
answer
11k
views
Is it okay to use symbolic links in my web server?
I have the following directory setup:
/var/www/html
and
/home/tim/Website/files_here
The folder html is actually a link to /home/tim/Website. This means all my Website files are in my home area (...
12
votes
2
answers
2k
views
Does Ubuntu One follow symlinks if synchronizing a folder?
I've looked for this question and haven't gotten a reasonable answer yet. If I synchronize a folder will it synchronize a symlink? Will it process all the way through the link to all the files within ...
10
votes
2
answers
5k
views
Make Folder a symbolic link to two folders?
I would like to have Ubuntu's default music folder /home/$USER/Music to act pretty much as a library would in Windows. Essentially it would be a virtual folder containing the contents of other folders....
7
votes
2
answers
535
views
Desktop shortcut to Bash script crashes and burns
I created a link in Nautilus in the ~/bin directory for a bash script located there. Then I cut and pasted the link into the ~/Desktop directory.
When I click on it nothing appears on the screen. If ...
7
votes
3
answers
8k
views
.desktop files - Allow launching - set this via CLI
I‘m customizing a Ubuntu Live (19.10) system and created .desktop files for installed applications. When booted up, I need to rightclick these files and choose „Allow launching“. Can I automate this ...
6
votes
1
answer
17k
views
/sbin/ldconfig.real: /usr/lib/libstdc++.so.5 is not a symbolic link
I keep getting this error:
fmf@kodi:~$ sudo ldconfig
/sbin/ldconfig.real: /usr/lib/libstdc++.so.5 is not a symbolic link
Any idea on how to fix it?
fmf@kodi:~$ lsb_release -a
No LSB modules are ...
5
votes
1
answer
49k
views
Create a symlink in /dev using /etc/udev/rules
I am studying for a Linux certification from the Linux foundation but I have some questions about one lab. Here is the lab:
Create and implement a rule on your system that will create a symlink ...
5
votes
2
answers
9k
views
Symbolic link doesn't use target working directory
I've created the following symbolic link:
Source: /usr/local/android-ndk-r5/ndk-build
Destination: /usr/local/bin/ndk-build
However, when I attempt to use ndk-build from my source directory, it ...
4
votes
3
answers
5k
views
How to sync folders on different partitions (symlink?)
I use Ubuntu One to synch my home/Documents folder among more computers. On a portable tablet I have set the Documents folder in a separate Fat32 partition named sda6, and I made it default documents ...
4
votes
3
answers
10k
views
Symbolic links vs Windows shortcuts?
What are the differences between symbolic links in Ubuntu and Windows shortcuts? Are they analogous concepts? Or is there something in Ubuntu that resembles more Windows shortcuts?
4
votes
2
answers
3k
views
How to run symlink'ed executable application from Desktop while using GNOME Shell?
I have Ubuntu 20.04 LTS installed with default GNOME Shell.
Then I have created symlink for some application on the ~/Desktop folder with
ln -s /usr/bin/xclock ~/Desktop/xclock
( the xclock is just ...
3
votes
2
answers
838
views
What is different symbolic link with hard link after unlik?
1.
#include <stdio.h>
#include <unistd.h>
void main(){
link("foo", "bar");
unlink("foo");
if(open("bar", 1) < 0)
printf("open error\n");
else
printf("...
3
votes
2
answers
2k
views
How do I create an shortcut to a folder(not a symlink) in Ubuntu 18.04 like shortcuts in windows
I need to create a shortcut to a folder in Ubuntu 18.04 like I did it windows.
I don't like symlinks for a navigation patterns I have used in windows. Symlink is not the best solution for me just ...
2
votes
3
answers
7k
views
Your python3 install is corrupted. Please fix the '/usr/bin/python3' symlink [duplicate]
Context: I am looking to upgrade to Ubuntu 20.04 LTS
I performed following steps:
$ sudo apt update
$ sudo apt upgrade -y
$ sudo reboot
$ sudo apt --purge autoremove
$ sudo apt install update-...
2
votes
2
answers
1k
views
Duplicate mount-points for external disks after 22.04.1 upgrade
Just did an upgrade from 20.04 to 22.04 with my external storage disks connected.
The system generated mount-points:
'Computer'/media/'homefolder'/4TB-WD-ElementsS - turned into
'Computer'/media/'...
1
vote
1
answer
592
views
Symbolic Link: Creating link from "NTFS Partiton" to ~/Desktop
I'm facing difficulty in creating a symbolic link to /media/my-username/storage/folder in ~/Desktop by using:
cd ~/Desktop
ln -s '/media/username/Storage/My-Files/semester-5' .
It creates a broken ...
0
votes
0
answers
939
views
Why can't /usr be a symbolic link?
I only have 8GB on the Ubuntu system partition and I am running out of space, so I tried to move the /usr directory (which takes 6GB out of 8GB) to another partition.
I did not want to make a ...
0
votes
0
answers
153
views
Multiple systemd broken links, system won't boot
On a reboot today, the system (Ubuntu Desktop 20.04.4) hung upon reaching the graphical target. Conspicuously, several services failed to start ahead of this, including snapd.
Booting the machine to ...
275
votes
10
answers
1.1m
views
How to list all symbolic links in a directory
I have a symbolic link in my /var/www/ directory that links to WordPress. When I run the command ls -la from the /var/www/ directory the link to WordPress doesn't show up. Is there a way to list all ...
140
votes
1
answer
432k
views
How to create a symbolic link in a linux directory? [duplicate]
I want to create a symlink that should point to another directory.
Like inside directory /var/www/vhosts/ecash-staging.com/ should be a symlink named as ecash_root that should pointing to --> /var/...
122
votes
2
answers
339k
views
Creating a symlink from one folder to another with different names?
I have two folders, one of which is my webserver root. I want to link it to my project folder so that I can keep things up-to-date with Git.
If I try to do this:
ln -s /home/user/project /var/www/...
25
votes
4
answers
94k
views
how can I symlink my home folder from another drive?
More specifically, I want to have the user folder for my home account another disk that has more space, but keep my other smaller accounts on my ssd. I was able to copy my user folder to another disk, ...
22
votes
1
answer
42k
views
Is it possible to change the permissions for the symbolic link?
I am trying to change the permissions for the symbolic link.
As how you can see in the image, the soft link has 777 permissions, but i would like to change that.
I tried to change that by:
chmod ...
22
votes
2
answers
1k
views
Is there a difference between a symbolic link via terminal or right-click make link?
I'm wondering if there is a difference between going to a terminal and typing ln -s path 'path or just right clicking on something and selecting make link.
17
votes
2
answers
51k
views
/bin/sh is a symbolic link that doesn't point to /bin/bash
I was installing the software environment of Armadeus experiment board APF27DEV, and when I tried the make command, it gave me the following error message:
On your system /bin/sh is a symbolic link ...
13
votes
3
answers
16k
views
How to create desktop shortcuts for folders in Ubuntu 20.04
How can you create desktop shortcuts for folders in Ubuntu 20.04? I can't see the "Make link" button when I right-click on it.
9
votes
2
answers
43k
views
Changing symlink "python" to "python3" causes problems [duplicate]
I have Python 2.7.3 and 3.2.3 installed on my Ubuntu 12.04 64bit (by default?). When I type "python", I want python 3.2 instead of 2.7.
Changing symlink "python" to link to python3 seems to cause big ...
8
votes
4
answers
15k
views
Is it safe to place symlinks in /bin directory ?
I have many command line tools that I use frequently.
I was using the normal method to traverse till the complete path of that command through terminal and then did ./command-name BUT this is a ...
7
votes
4
answers
13k
views
How to find the original file of a soft link?
For example, I have a file a, and I do the followings.
ln -s a b
ln -s b c
ln -s c d
If I use readlink d, I will get c. So I have to run many times to get a.
Is there an easy way to get a?
Update:
...