Linux and bash-scripting

This is a learning objective about Linux, from Linnaeus University, Kalmar, Sweden. This work is licensed under CC BY 2.0

This work is intended for the students in the UDM - Utvecklare och drift av mjukvarusystem and the WP - Webbprogrammerare programs. This is not a complete course in Linux but just an introduction for program students at Linnaeus University, Kalmar, Sweden

All video recording will be in Swedish

This content is concentrated to server versions of the Ubuntu distributions.

Goal

The student should get an understanding of the Linux system and its characteristics. The student will also get some experience in using bash commands, text editors and bash scripting.

About this learning object

Video on youtube - Explains this learning object

Linux - an introduction

Video on youtube - A short introduction to Linux, it's history and use today (Slides)

In the video Vagrant and Virtual box are used for running virtual machines with Ubuntu and CentOS.

If you have docker installed and running you could start use these commands to start up instances:

docker run -it ubuntu /bin/bash   # runs and starts a ubuntu container
docker run -it centos /bin/bash   # runs and starts a centos container

If you do not have Docker installed, this is a perfect time to install it. You find Docker Desktop at https://www.docker.com/get-started

The shell

This text document) gives an introduction to a Linux system shell. It will also link to a Cheat Sheet with different commands you should study. At the end of the text there are some exercises to practice on.

Using the terminal, text editors

Video on youtube - Showing how to work with the shell and some of its text editors

Resources on the text editors

Package management

Video on youtube - A short video how to update your system and how to install new packages/applications

Users, Permissions, Groups

Be sure to read this article to get the theoretical view of how Linux is handling files, directories, users and permissions

Video on youtube - Some example of user/groups handling in Linux

Introduction to Bash scripting

  • A short introduction - Video
  • A simple example of a script - Video
  • Some ideas for exercise scripts - Text

Resources for bash

The net is full of different pages about bash scripting. A good start is the three links below. Since you all know about programming; what a selection statement and a loop is for example we are more into studying the syntax. Especially the "part 1" and "part 2" is good for this. The third part have some good examples of bash scripts though. Start by reading these guides.

More resources

To get a deeper understanding and get a searchable pdf during this learning object we recommend the following links:

Feel free to contribute

This content can always have higher quality. Help us to make it better. Fork it! Make pull requests! All can help!

Repository

Contact

Contact us through GitHub

Välkommen till CoursePress

en utav Linnéuniversitets lärplattformar. Som inloggad student kan du kommunicera, hålla koll på dina kurser och mycket mer. Du som är gäst kan nå de flesta kurser och dess innehåll utan att logga in.

Läs mer lärplattformar vid Linnéuniversitetet

Studentkonto

För att logga in behöver du ett studentkonto vid Linnéuniversitet.

Läs mer om att hämta ut studentkonto

Inloggning LNU