2

I am following this thread: How to install Eclipse?

I downloaded eclipse-jee-mars-1-linux-gtk-x86_64.tar.gz into ~/Documents and ran the tar command that extracted the package into an eclipse folder inside ~/Documents -- ~/Documents/eclipse now exists.

I don't have permission to copy this folder to /opt, so I log-in as root with su - command and password. As root, I try to execute the sudo mv eclipse /opt command but it's throwing the error: mv: cannot stat 'eclipse': No such file or directory.

It seems no one has had this problem. What's the issue here?

2 Answers2

2

When you login as su - your environment changes, you are now root and current working directory is /root

skolodya@ubuntu:$ su -                                                         
Password: 
$ pwd
/root

What you need to do is mv /home/$USER/eclipse /opt . Note: change $USER to your actual user name

Side note: When you run as root you dont need sudo. As regular user , without login in to su - you could just do sudo mv ~/Documents/eclipse /opt and that would do it, because your environment with sudo wouldn't change

0

Serg gave the right answer but I'd just like to add that Eclipse is available in the Ubuntu software centre, which will allow you to get automatic updates, unlike downloading the source.

To get Eclipse installed easily, just search for it in the Software Centre (or search for eclipse-platform), or use sudo apt install eclipse*.

cat
  • 1,712