LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-15-2004, 08:27 AM   #1
nws_linux
LQ Newbie
 
Registered: Sep 2004
Posts: 5

Rep: Reputation: 0
Question Changing the default /tmp location


Hello:
All rookies here, trying to install RedHat Linux ES 3.0.
While doing the initial install, we forgot to add a /tmp partition. Now, my root partition contains only 250MB of space. By default, the temporary variables are stored in /root/tmp. Is there any way I can edit this location to point somewhere else ?
Any ideas are welcome. Thanks.
 
Old 09-15-2004, 08:34 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
First create a temporary directory somewhere with more space. Let's call this /home/tmp for the sake of example.

If you login in single-user mode, you can delete (rm -rf) the tmp directory. You can then create a symbolic link to the new directory with:
Code:
ln -s /root/tmp /home/tmp
This effectively remaps the /root/tmp directory to /home/tmp.

Another alternative is to mount another partition onto /root/tmp, possibly a tmpfs partition (tmpfs is held in memory, is not preserved between reboots, and doesn't need a physical partition. But it does tend to eat up RAM). I think that's:
Code:
rm -rf /root/tmp/*
mount /root/tmp -t tmpfs
This will allow you to store whatever you like in /root/tmp without eating up space on /.

By the way, I've assumed that you meant /root/tmp as you said, and didn't use /root to mean “the root directory” (i.e./) If not, replace all /root/ with just / in the above.

Last edited by rjlee; 09-15-2004 at 08:36 AM.
 
Old 09-15-2004, 09:07 AM   #3
nws_linux
LQ Newbie
 
Registered: Sep 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks so much. I am going to try that out immediately and will let you know what happens.
By /root I meant "the root directory".
 
Old 09-15-2004, 12:35 PM   #4
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 87
Just for clarification, let me reiterate rjlees's comment: "/root" is not the root directory, "/" is. The / directory (aka "root directory") is the very top level directory, and the one within which all other directories are created. The "/root" directory is simply the home directory of the root user.

As you know, for each regular user account that you create, a separate directory will be created under /home. If you created a user called "nws" then you would also have a directory called "/home/nws". For the root user, the equivalent of that home directory is "/root". -- J.W.
 
Old 09-15-2004, 01:34 PM   #5
nws_linux
LQ Newbie
 
Registered: Sep 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Yeah..understood that.
We couldn't get the /tmp to point elsewhere. Any ideas ?
 
Old 09-15-2004, 02:18 PM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
What exact problem did you have when you tried the ln command that rjlee suggested? Did you try mounting something new on /tmp (i.e. a ramdisk or loop filesystem)? Please tell us precisely what went wrong, so we can help you.
 
Old 09-16-2004, 10:45 AM   #7
nws_linux
LQ Newbie
 
Registered: Sep 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Actually, we created a lable for /tmp in the /etc/fstab and rebooted the server. Worked.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing emacs' default file location rose_bud4201 Linux - Software 6 11-16-2004 11:01 PM
Changing default Mozilla location compassman Linux - Software 2 06-26-2004 03:44 PM
Changing Orbit tmp location ciaran_skye Mandriva 0 06-15-2004 01:37 PM
changing user's default ftp home location GraemeK Linux - Networking 0 12-31-2003 12:11 PM
changing default mount location MeanJoshGreen Linux - Hardware 3 12-07-2003 02:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration