0

I'm fairly new to Ubuntu and using a Unix shell. I'm working with Ubuntu 14.04

I'm getting an unusual error when I try using the apt get command for any purpose.

>>shreya:~$ sudo apt -get install openssh-server

Running a command like this, or any other command with the apt -get method, gives me the following.

>>E: Command line option 'g' [from -get] is not known.

I can't find any documentation elsewhere which can give me any pointers. Suggestions, any? :)

1 Answer 1

1

It is apt-get without the space (not apt -get )

In general the syntax is command and then options. -s are short flags and there may be --long-flags as well with two --

apt is also a command, and with the space, you are trying to run apt with the g,e, and t options. As there is no -g option, you get your error.

If you run a non-existant command apttgett or some such you will get a command not found error.

When in doubt, try the man pages. They take a short time to comprehend, and as with all documentation, some are better then others.

man apt

man apt-get
2
  • Thanks! It worked. Feel a little sheepish though, completely new to shell scripting! Jun 3, 2014 at 22:08
  • no problem, you will find, with experience, many error messages you receive in Ubuntu are informational. It just takes time to learn is all.
    – Panther
    Jun 3, 2014 at 22:11

You must log in to answer this question.

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