Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Apologies if I'm not using the right terminology here, I'm guessing that's why I'm not getting the solution I want when I search for this question.
I'm using a pi with an attached hard drive. What I'd like to do is when I SSH in, rather than find myself in /home/pi, find myself in /media/hdd, as there's where I find everything I use and rarely use /home/pi.
I do not want to move /home/pi at all, I still need it for all my config files.
I would compromise by running the following line (in /home/pi)
Code:
ln -s /media/hdd .
then /home/pi is the home directory, with config files. /home/pi/hdd is /media/hdd, and you don't have to fiddle with anything.
If you really want /media/hdd as the home dir, you would hit problems if ever the pi came up and /media/hdd wasn't there. You can do that sore of thing to yourself with usermod (man usermod) but what I'm suggesting is safer. This way, if the disk isn't there, it's a "no such file or directory" error.
Thank you for highlighting potential problems and presenting a safe, simple and elegant solution, whilst also presenting the solution to my original question if I felt like taking a risk!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.