Linux Format

Step inside the Terminal…

-

While a standard Linux desktop like Ubuntu’s Unity or Gnome provides a familiar point-andclick environmen­t for performing day-to-day tasks, it’s still no match for the power and versatilit­y of the Linux “shell”, the underlying command-line environmen­t. And thanks to the Terminal, you can interact directly with the shell without leaving the desktop.

The standard Linux shell utilises a language called BASH to run specific commands using a series of tools. Each command follows the same

basic structure: $ utility <command> -option

The utility portion of the command is the tool that you wish to run – for example, cd to change directory, or apt-get to trigger the software install tool. Some utilities can be run on their own – type ls and you’ll get a basic list of all files and folders in a directory, for example.

If you add a command to the utility , you can specify what you want that utility to do: $ apt-get install <program>

This instructs the software package tool to install the named program. Finally, the -option section is where you specify one (or more) preference­s using flags . Each flag should be preceded by one (-) or two (--) dashes. For example, to obtain more detailed informatio­n about the contents of the current folder, type: $ ls -l

The -l flag ensures you get extra snippets like file permission­s and owner, along with the date it was last modified and its size in bytes.

Newspapers in English

Newspapers from Australia