0

Can someone walk me through getting gparted on my computer so that I can install a second hard drive. This is the error I get everytime I write in

$ apt-get install gparted.
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
heemayl
  • 91,753
  • On a terminal window sudo gparted – bistoco Apr 01 '16 at 18:43
  • @bistoco No, Robert is currently trying to install gparted. Your command would run it, but not in a good way. Never use sudo to run GUI applications as root. Gparted comes with a command that automatically elevates your privileges using pkexec. Therefore you should run gparted-pkexec to start it instead of sudo gparted. – Byte Commander Apr 01 '16 at 18:53
  • 2
    @RoberScott You want to run sudo apt-get install gparted, because installing packages requires root privileges and therefore you need the sudo. It will then also ask you to enter your account password. – Byte Commander Apr 01 '16 at 18:54
  • @ByteCommander, can you please explain why "never"? – bistoco Apr 01 '16 at 19:00
  • @bistoco Please read this question: http://askubuntu.com/q/270006/367990 – Byte Commander Apr 01 '16 at 19:15

1 Answers1

-1

Like heemayl said, you need so run sudo apt-get install gparted so that you run the apt-get command as root (adding sudo before a command in default ubuntu tells the computer that you want to run the command as root.)

Root in Linux gives you unlimited access to your computer, meaning that you can ruin pretty much anything you want, so use it with care.

Timoshenko
  • 19
  • 3
  • heemayl didn't say that, he put in a close vote, marking this question as a duplicate of the one he linked. Please don't answer duplicate questions with the same answer given at the original – TheWanderer Apr 01 '16 at 22:08