code: def default_aliases():
      """Return list of shell aliases to auto-define."""
      # Note: the aliases defined here should be safe to use on a kernel
      # regardless of what frontend it is attached to.  Frontends that use a
      # kernel in-process can define additional aliases that will only work in
      # their case.  For example, things like 'less' or 'clear' that manipulate
      # the terminal should NOT be declared here, as they will only work if the
      # kernel is running inside a true terminal, and not over the network.
  
      if os.name == "posix":
          default_aliases = [
              ("mkdir", "mkdir"),
              ("rmdir", "rmdir"),
              ("mv", "mv"),
              ("rm", "rm"),
              ("cp", "cp"),
              ("cat", "cat"),
          ]
          # Useful set of ls aliases.  The GNU and BSD options are a little
          # different, so we make aliases that provide as similar as possible
          # behavior in ipython, by passing the right flags for each platform
          if sys.platform.startswith("linux"):
              ls_aliases = [
                  ("ls", "ls -F --color"),
                  # long ls
                  ("ll", "ls -F -o --color"),
                  # ls normal files only
                  ("lf", "ls -F -o --color %l | grep ^-"),
                  # ls symbolic links
                  ("lk", "ls -F -o --color %l | grep ^l"),
                  # directories or links to directories,
                  ("ldir", "ls -F -o --color %l | grep /$"),
                  # things which are executable
                  ("lx", "ls -F -o --color %l | grep ^-..x"),
              ]
          elif sys.platform.startswith(
              "openbsd"
          ) or sys.platform.startswith("netbsd"):
              # OpenBSD, NetBSD. The ls implementation on these platforms do not support
              # the -G switch and lack the ability to use colorized output.
              ls_aliases = [
                  ("ls", "ls -F"),
                  # long ls
                  ("ll", "ls -F -l"),
                  # ls normal files only
                  ("lf", "ls -F -l %l | grep ^-"),
                  # ls symbolic links
                  ("lk", "ls -F -l %l | grep ^l"),
                  # directories or links to directories,
                  ("ldir", "ls -F -l %l | grep /$"),
                  # things which are executable
                  ("lx", "ls -F -l %l | grep ^-..x"),
              ]
          else:
              # BSD, OSX, etc.
              ls_aliases = [
                  ("ls", "ls -F -G"),
                  # long ls
                  ("ll", "ls -F -l -G"),
                  # ls normal files only
                  ("lf", "ls -F -l -G %l | grep ^-"),
                  # ls symbolic links
                  ("lk", "ls -F -l -G %l | grep ^l"),
                  # directories or links to directories,
                  ("ldir", "ls -F -G -l %l | grep /$"),
                  # things which are executable
                  ("lx", "ls -F -l -G %l | grep ^-..x"),
              ]
          default_aliases = default_aliases + ls_aliases
      elif os.name in ["nt", "dos"]:
          default_aliases = [
              ("ls", "dir /on"),
              ("ddir", "dir /ad /on"),
              ("ldir", "dir /ad /on"),
              ("mkdir", "mkdir"),
              ("rmdir", "rmdir"),
              ("echo", "echo"),
              ("ren", "ren"),
              ("copy", "copy"),
          ]
      else:
          default_aliases = []
  
      return default_aliases
  
imports: import os
  import re
  import sys
  from traitlets.config.configurable import Configurable
  from .error import UsageError
  from traitlets import List, Instance
  from logging import error
label_desc: Use image node_id 1 for calling a global function with example usage: default_aliases() and returns: default_aliases