Trying Out Commands

Opening a terminal

  • Use the start button at the bottom left to show pre-installed applications.
  • Then run the Terminal application
    Terminal
  • Inside this window, you are actually running the famous linux-shell, in this case bash.
  • Most of the time, linux user type text commands in a shell like this.
    let't try this out.

Running commands

  • Most people try this well-known linux command:
1ls

It will show a list of the files.

  • This is not something that is part of the shell!
    This is the linux philosophy: The ls command is actually a program you have just run.
  • Now try:
1ls -l

The parameter l is preceded with a dash, and specify long listing of files.
Let's add another parameter, a, that instructs ls to show us hidden files (files with names starting with a dot).
You can also comnine both parameters.
Here are the two versions:

1ls -l -a
2ls -la

First Usefull Commands

Try these commands!

general commands:

  • whoami - print effective user name
  • hostname- show or set the system's host name
  • uname - print system information

files:

  • ls - list directory contents
  • cat - concatenate files and print on the standard output
  • rm - remove files or directories
  • mv - move (rename) files
  • cp - copy files and directories
  • touch - change file timestamps (or create)

directories

  • pwd - print name of current/working directory
  • mkdir - make directories
  • cd - change the working directory