0

When I installed Ubuntu I created two partitions: \usr and \home, respectively of 20 GB and 180 GB. Now Ubuntu says me that the space to install softwares is exhausting (\usr has only 800 MB of free space).

How can I exploit the \home partition by means of its 180 GB?

1

1 Answer 1

0

Keep in mind that the forward slash "/" and not the back slash "\" is the character for specifying a directory in Linux. The backslash is a special character that will give special attributes to the next character that following it.

As far as using the 180G area, you can find a directory that has content that you might want to consider adding a symbolic link to space on the /home partition.

You can check what is using a lot of your space in your /usr partition with this command (or a variation there off):

$ cd /usr
$ du -sh $(ls)

Some of the directories will require elevated access to scan. You can add sudo to check the size of those folders.

$ sudo du -sh $(ls)

If you have folders that have spaces you can check those folders by temporarily modifying the field separator with this variation of the command.

$ STOREIFS=$IFS && IFS=$(echo -en "\n\b") && sudo du -sh $(ls);IFS=$STOREIFS

Now once you see the folder that is taking up all your space you can move the files to a directory on your /home folder and make a symbolic link to it as such (for instance if /games is the oversize folder).

$ sudo mkdir /home/games
$ sudo cp -pvau /usr/games /home/
$ sudo mv /usr/games /usr/games.old
$ sudo ln -s /home/games /usr/games

Now after you have verified that the new physical location of your /usr/games folder works you can delete the /usr/games.old folder.

I used /usr/games as an example. You could do that with any folder from the /usr directory.

2
  • It works. I found /usr/local directory. The only strange thing is that a new /home/local directory has not been created. Files and directories in the /usr/local have been directly copied in the /home directory.
    – Alessandro
    Jan 20, 2016 at 11:36
  • @Alessandro What did you use for the cp parameter? Did you use -pvau? The -a is what will create the directories...(copy directories recursively). Jan 20, 2016 at 14:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .