Structure
- Introduction - why and where
- Installation of Ubuntu
- Writing and compiling a simple C♯ program
Why?
- 74.44% Windows
- 12.22% macOS
- 9.51% Other
- 1.58% Linux
According to statcounter GlobalStats
Why?
- 69.4% of webservers use a Unix-based OS
- 30.6% of webservers use Windows
According to W3Techs
Where?
- US Department of Defence
- French Parliament
- Amazon
- Android
Sources: 1
Installing Ubuntu
What's Ubuntu?
- A distribution of Linux
- Others are available, but Ubuntu is great for beginners
- Lots of help available online if you get stuck
![The logos of a number of different linux distributions.](./images/linux-logos.png)
Let's Get Started!
- Open Hyper-V to access the VM
Choosing the language
![Install step 0: Choosing the language](./images/VM-Install/0.png)
Boot menu
![Install step 1: Boot menu](./images/VM-Install/1.png)
Welcome
![Install step 2](./images/VM-Install/2.png)
Keyboard Layout
![Install step 3: keyboard layout](./images/VM-Install/3.png)
Initial Software and Updates
![Install step 4](./images/VM-Install/4.png)
Partitioning
![Install step 5](./images/VM-Install/5.png)
Dual Booting
![Install step 6](./images/VM-Install/6.png)
I'm sure it's fine.....
![Install step 7](./images/VM-Install/7.png)
Location
![Install step 8](./images/VM-Install/8.png)
Credentials
![Install step 9](./images/VM-Install/9.png)
Now we wait!
![Install step 10](./images/VM-Install/10.png)
and wait
![Install step 12](./images/VM-Install/12.png)
Complete!
![Install step 13](./images/VM-Install/13.png)
Logging in
![Install step 14](./images/VM-Install/14.png)
Type your password
![Install step 15](./images/VM-Install/15.png)
![Install step 16](./images/VM-Install/16.png)
![Install step 17](./images/VM-Install/17.png)
![Install step 18](./images/VM-Install/18.png)
The amazing apt
![Install step 20](./images/VM-Install/20.png)
Doing it manually
![Install step 21](./images/VM-Install/21.png)
Done!
- Installation complete!
- What next?
- Linux basics
- Let's write some C♯
Linux Basics
Things to talk about
- Similarities and differences to Windows
- Filesystem structure
- Typing your password with
sudo
Similarities and Differeences
- Command line → Terminal
- Package management - more on this later
- File system: ext4, not NTFS
Filesystem Structure
- Everything starts with
/
- ...and everything is a file
Places to remember
/etc |
Configuration files |
/home |
User home folders |
/usr/bin |
Program binaries (also other places; some are symlinks) |
/var/log |
Log files |
/dev |
Hardware devices |
Typing your password
- On Linux, typing your password is a key security mechanism
-
Ask yourself:
- "Why am I typing my password?"
- "Do I understand what it's going to do?"
- "Do I trust the program?"
- Ask for help / an explanation if unsure
Let's Compile some C♯!
Package Management
- Most Linux distributions use a package manager
- Everything is a package - from your kernel to the software that you use
- Debian-based distributions use
apt
- GUIs do exist - Synaptic
Mono
- Mono is the .NET runtime on Linux
- Mono isn't available in the default
apt
repositories on Ubuntu - ...so we need to add a new apt repository!
- https://www.mono-project.com/download/stable/
Installation
- We have the
apt
repository - Now we can install
Mono
sudo apt install mono-devel
Usage
- The Linux terminal is similar to the Windows command prompt
- Download a Visual Studio solution now if possible
- Use a text editor to write a quick program otherwise
Usage (cont.)
- We can use
csc
andmsbuild
to compile just like we do on Windows csc MyFile.cs
msbuild
Monodevelop
What's Monodevelop?
- Writing C♯ code in a text editor is old-school
- Like Visual Studio, but on Linux
- Actually the base of Visual Studio for Mac
Installing
- Same prodecure as with Mono
- Challenge: Can you install Monodevelop using what you've learnt?
- https://www.monodevelop.com/download/
Summary
Summary
- We've installed Ubuntu
- We've installed Mono
- We've compiled some C♯
- We've looked at Monodevelop
Where next?
- Web server setup
- Application server setup
- Git hosting
Email hosting- Decentralised Instant Messaging
Thanks for coming!
- Bought to you by Freeside
- Feedback: https://forms.gle/cbWKnurf75Exi8ry8
- Join us: https://freeside.co.uk/
- Discord | Forums | PC Access
- Questions?