Ubuntu
Ubuntu
SUBSYSTEM
for LINUX - UBUNTU
Table of contents
01 02
Introduce Install
03 04
Command line MAKEFILE
01 Introduce
What is Window Subsystem for
Linux?
WSL
● The Windows Subsystem for Linux lets developers run a GNU/Linux environment --
including most command-line tools, utilities, and applications -- directly on Windows,
unmodified, without the overhead of a traditional virtual machine or dualboot setup.
● Features:
○ Run command line tool
○ Run Bash shell scripts
02 Install
Run Windows 10 version 2004 and
higher (Build 19041 and higher) or
Windows 11 to use the commands
below
Terminal
● Variables representing constants a user might want to customize on the command line
or in the environment are written in all uppercase, by convention.
● To use variables, using ${var} or $(var).
● Operators:
If you want all target to run with a command -> The all target
Or you can run multiple targets rule.
main.o: main.c sum.h
Rule
gcc –c main.c
Tab
Dependency
Target
Action
Implicit rule
This implicit rule says how to make x out of x.c -- run cc on x.c and call the output x.
The rule is implicit because no particular target is mentioned.
Macros
● The make program allows you to use macros, which are similar to variables. Macros
are defined in a Makefile as = pairs.
● Some special macros: (self learning -> for the homework)
Variables Description
AS Program to compiling assembly files; default is `as'.
CC Program to compiling C programs; default is `cc'.
CXX Program to compiling C++ programs; default is `g++'.
CPP Program to running the C preprocessor, with results to
standard output; default is `$(CC) -E'.
Wildcards
* wildcard
% wildcard
When used in “matching” mode, it
Searches your filesystem for matches one or more characters in a
matching filenames. string
may be used in the target, When used in “replacing” mode, it
prerequisites, or in wildcard function. takes the matching and replaces that in
a string.
Static Pattern rules?
Pattern rules?
Automatic variables
$@ Name of target.
$% The target member name in archive.
$< The name of the first prerequisites.
$? The name of all the prerequisites that are newer than the
target, with spaces between them.
$^ The name of all the prerequisites, with spaces between
them.
Static Pattern Rules
The essence is that the given target is matched by the target-pattern (via a %
wildcard).Whatever was matched is called the stem. The stem is then substituted into
the pre-req-pattern, to generate the target's pre-reqs.
Example 3.2
Static Pattern Rules and Filter
Filter function remove files that are not suitable in a file list.
Syntax: $(filter pattern . . . , text)
Example 3.3, 3.4
Condition
Syntax:
Ifeq | Ifneq
action
Else
action
Endif
Example 3.5
Functions
● Vim is a text editor that is an upgraded version of the Vi editor and is more compatible with Vi.
The most usage of vi editors is to create a new file, edit an existing file, or just read a file. Vim
editor is more useful in editing different kinds of plain text. This command is more used in editing
programs.
● Operating modes in vim editor:
• Command Mode: By default, command mode is on as soon as the vim editor is
started. This command mode helps users to copy, paste, delete, or move text. We
should be pressing [Esc] key to go to command mode when we are in other
modes.
• Insert mode: Whenever we try to open vim editor, it will go to command mode
by default. To write the contents in the file, we must go to insert mode. Press ‘I’
to go to insert mode. If we want to go back to command mode, press the [Esc]
key.
Basic commands of VIM
● To open or create a file: vim {filename}.
● To enable editing that file: [Insert] key or [I] key
● [ESC] -> normal mode
For more information about editing slides, please read our FAQs or visit Slidesgo School:
https://slidesgo.com/faqs and https://slidesgo.com/slidesgo-school
Instructions for use (premium users)
As a Premium user, you can use this template without attributing Slidesgo or keeping the "Thanks" slide.
For more information about editing slides, please read our FAQs or visit Slidesgo School:
https://slidesgo.com/faqs and https://slidesgo.com/slidesgo-school
Fonts & colors used
Audiowide
(https://fonts.google.com/specimen/Audiowide)
Karla
(https://fonts.google.com/specimen/Karla)
Create your Story with our illustrated concepts. Choose the style you like the most, edit its colors, pick
the background and layers you want to show and bring them to life with the animator panel! It will boost
your presentation. Check out how it works.
You can easily resize these resources without losing quality. To change the color, just ungroup the resource
and click on the object you want to change. Then, click on the paint bucket and select the color you want.
Group the resource again when you’re done. You can also look for more infographics on Slidesgo.
JANUARY FEBRUARY MARCH APRIL MAY JUNE
PHASE 1
Task 1
Task 2
PHASE 2
Task 1
Task 2
PHASE
1
Task 1
Task 2
...and our sets of editable icons