How to Invoke the Bash Shell Command Interpreter with Options on Ubuntu 15.10 Wily Linux

January 10, 2016 | By the+gnu+linux+evangelist | Filed in: Tutorial.

Ubuntu Running Bash Shell with Options & Arguments

The Tutorial Shows You How to Invoke a Bash Shell with Options and Arguments in Details for Ubuntu 15.10 Wily Werewolf GNU/Linux.

Bash Shell is a Command Interpreter with the main purpose of allowing you to Interact with the Computer’s Operating System.

The Bash (Bourne Again Shell) is the Default Shell environment for most GNU/Linux system.

Bash can execute commands from a Terminal, from a File, or from Standard Input.

  1. Open a Shell session
    Ctrl+Alt+t to open a Terminal emulator on Desktop
    (Press “Enter” to Execute Commands)

    Invoking Bash Shell with Options and Arguments on Ubuntu 15.10 Wily Linux - Open Terminal Shell Emulator
  2. Invoking the Bash Shell on Ubuntu.

    bash [options] [arguments]

    See below to find a List of All Options and Arguments


    • -c str
          Reads commands from the string str.

    • -D , –dump-strings
          Output all $”…” strings contained in a Bash script.

    • -i
          Create an interactive shell. The default behavior on a terminal.

    • -l, –login
          Shell is a login one. It executes commands contained from the /etc/profile and on the first between ~/.bashrc, ~/.bash_login and ~/.profile.

    • -O option
          Enable shopt option option that set a custom shell behaviour. Use +O to unset option.

    • -p
          Start up as a privileged user. Read only the normal fixed name startup files as ~/.bashrc. Skip to import functions from the environment and ignore to read $ENV or $BASH_ENV files and BASHOPTS, CDPATH, GLOBIGNORE and SHELLOPTS variables.

    • -r, –restricted
          Create a restriced shell. A restricted shell is used to set up an environment more controlled than the standard shell.

    • -s
          Read commands from standard input. It is used to execute a local script on a remote machine.

    • –debugger
          Read the debugging profile at startup and turn on the extdebug option on shopt. The purpose of a debugger such as the BASH debugger is to allow you to see what is going on “inside” a bash script while it executes.

    • –dump-po-strings
          Output all $”…” strings like -D but in GNU gettext format.

    • –help
          Print a usage message and exit.

    • –init-file file , –rcfile file
          Use a custom startup file instead of ~/.bashrc for inter-active shells.

    • –noediting
          Do not use the readline library for input, even in an inter-active shell.

    • –noprofile
          Do not read /etc/profile or any of the personal startup files.

    • –norc
          Do not read ~/.bashrc . Enabled automatically when invoked as sh .

    • –posix
          Turn on POSIX mode.

    • –verbose
          Same as set -v; the shell prints lines as it reads them.

    • –version
          Print a version message and exit.

    • -, —
          End option processing.


    Arguments are assigned in order to the positional parameters $0, $1 , $2 , etc.
    If the first argument is a script, commands are read from it, and the remaining arguments are assigned to $1 , $2 , etc.
    The name of the script is available as $0 . The script file itself need not be executable, but it must be readable.

Tags: , , , , , , , , , , , , , , , ,

QuickChic Theme • Powered by WordPress