Linux Basics


Linux Basics

To navigate through the filesystem, you can use the commands cd to change a directory, ls to list files and folders within the current directory, and pwd to show the path of the current directory.

  1. Type pwd to list the current working directory (Hint: it should be /home/summer)
  2. Type ls to list all files and folders in your directory
  3. Type mkdir Test to create a new folder Test
  4. Type ls again to list all files and folders in your directory
  5. Type cd Test to go into the folder Test (Hint: you can use the Tab-key to autocomplete)
  6. Type pwd to list the current working directory
  7. Type ls to list all files and folders in your directory

There are a couple of text editors for the shell: nano, emacs, vim are common editors. They’re more or less difficult to handle. If you use the shell on a regular basis you may learn emacs or vim, the easiest editor is nano, which we’re using in the following steps.

nano test.txt

It will create a new file named test.txt.

nano

  1. Type pwd to list the current working directory
  2. Type cat test.txt to show the file's content
  3. Type cp test.txt new_file.txt to copy the file’s content to new_file.txt (which creates a new file or overwrites an existing file)
  4. Type cd .. to move one directory up
  5. Type pwd to list the current working directory
  6. Type rm -r Test to remove the directory and its content recursively
  7. Type ls to list all files and folders in your directory

Modern Linux distributions use systemd as a process-manager. They don’t use the administrator account (root) with a password, but rather allow specific users to login as the superuser with their own passwords. Use sudo -i to access an interactive shell as root.

You can close the (root) shell by pressing CTRL + D or typing exit

Management over Network

With the network configured properly it is possible to manage the VM remotely over a secure shell (ssh). A commonly used program for this is Putty.

putty1

You can copy text in putty by marking it with the mouse and paste it at cursor position with the right mouse button.