Nix. for Functional Systems
|
|
- Collin Nash
- 6 years ago
- Views:
Transcription
1 Nix for Functional Systems
2 1. What Nix is 2. How Nix works 3. How I use Nix
3 "Every build tool sucks" "Every dependency manager sucks"
4 What is it? Programming language Package/build manager Operating system
5 1. Nix started around Been using Nix since late Switched to NixOS early 2015
6
7 Code reuse Reproducibility Atomic upgrades
8 Functions! f(x) =???
9 { stdenv, fetchurl }: stdenv.mkderivation rec { name = "hello-2.10"; src = fetchurl { url = "mirror://gnu/hello/${name}.tar.gz"; sha256 = "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl"; }; docheck = true; }
10 $ nix-instantiate --no-gc-warning '<nixpkgs>' -A hello /nix/store/bzqrpq-hello-2.10.drv
11 $ pp-aterm < $(!!) Derive( [("out", "/nix/store/h3k6gm-hello-2.10", "", "")], [ ("/nix/store/sfpnlg-stdenv.drv", ["out"]), ("/nix/store/jhaz7i-bash-4.4-p12.drv", ["out"]), ("/nix/store/dqkx5-hello-2.10.tar.gz.drv", ["out"]) ], ["/nix/store/02c25b-default-builder.sh"], "x86_64-linux", "/nix/store/s59hbs-bash-4.4-p12/bin/bash", ["-e", "/nix/store/02c25b-default-builder.sh"], [ ("buildinputs", ""), ("builder", "/nix/store/hbs-bash-4.4-p12/bin/bash"), ("docheck", "1"), ("name", "hello-2.10"), ("nativebuildinputs", ""), ("out", "/nix/store/h3k6gm-hello-2.10"), ("propagatedbuildinputs", ""), ("propagatednativebuildinputs", ""), ("src", "/nix/store/z0qh8g-hello-2.10.tar.gz"), ("stdenv", "/nix/store/cpd6h7-stdenv"), ("system", "x86_64-linux") ] )
12 # Masked Derive( [("out", "", "", "")], [ ("/nix/store/sfpnlg-stdenv.drv", ["out"]), ("/nix/store/jhaz7i-bash-4.4-p12.drv", ["out"]), ("/nix/store/dqkx5-hello-2.10.tar.gz.drv", ["out"]) ], ["/nix/store/02c25b-default-builder.sh"], "x86_64-linux", "/nix/store/s59hbs-bash-4.4-p12/bin/bash", ["-e", "/nix/store/02c25b-default-builder.sh"], [ ("buildinputs", ""), ("builder", "/nix/store/hbs-bash-4.4-p12/bin/bash"), ("docheck", "1"), ("name", "hello-2.10"), ("nativebuildinputs", ""), ("out", ""), ("propagatedbuildinputs", ""), ("propagatednativebuildinputs", ""), ("src", "/nix/store/z0qh8g-hello-2.10.tar.gz"), ("stdenv", "/nix/store/cpd6h7-stdenv"), ("system", "x86_64-linux") ] )
13 /nix/store drvhash inputs maskedcontent = "bzqrpq" outhash maskedcontent = "h3k6gm" Outputs: 1. Normal 2. Fixed output
14 default-builder.sh source $stdenv/setup genericbuild
15 stdenv/setup genericbuild() { if [ -z "$phases" ]; then phases="$prephases unpackphase patchphase \ configurephase buildphase checkphase \ installphase fixupphase installcheckphase \ $predistphases distphase $postphases"; fi } for curphase in $phases; do eval "${!curphase:-$curphase}" done
16 stdenv/setup configurephase() { runhook preconfigure configurescript=./configure if [ -z "$dontaddprefix" -a -n "$prefix" ]; then configureflags="---prefix=$prefix \ $configureflags" fi if [ -n "$configurescript" ]; then echo "configure flags: $configureflags" $configurescript $configureflags else echo "no configure script, doing nothing" fi } runhook postconfigure
17 stdenv/setup installphase() { runhook preinstall if [ -n "$prefix" ]; then mkdir -p "$prefix" fi installtargets=${installtargets:-install} echo "install flags: $installtargets $makeflags" make ${makefile:+-f $makefile} $installtargets \ $makeflags "${makeflagsarray[@]}" \ $installflags "${installflagsarray[@]}" } runhook postinstall
18 Substitutes $ nix-store --realise \ --ignore-unknown /nix/store/h3k6gm-hello-2.10 these paths will be fetched (5 MiB download): /nix/store/h3k6gm-hello-2.10 /nix/store/q3wx1g-glibc-2.24
19 Runtime dependencies Nix looks for the hashes of inputs in the build output. Graph is stored in the Nix SQLite database.
20 Nix profiles $ readlink ~/.nix-profile /nix/var/nix/profiles/per-user/brian/profile $ readlink $(readlink ~/.nix-profile) profile-276-link $ export PATH="$HOME/.nix-profile/bin:$PATH"
21 $ nix-env -i hello $ readlink $(readlink ~/.nix-profile) profile-277-link $ readlink ~/.nix-profile/bin/hello /nix/store/jl72gxms9rg3czv3wj1rsk-hello-2.10/bin/hello
22 Garbage collection $ nix-collect-garbage --delete-older-than 60d 6544 store paths deleted, MiB freed
23 nixpkgs Packages: ~7385 top level ~11444 Haskell ~12609 R NixOS Build support: Docker images Virtual machine images deb & rpm packages
24 $ nix-shell -p 'haskellpackages.ghcwithpackages \ (p: [ p.hint p.lens-aeson p.brick ])' [nix-shell:~]$ ghci GHCi, version 8.0.1: Loaded GHCi configuration from /home/brian/.ghci Prelude λ
25 $ cabal2nix./. { mkderivation, base, optparse-applicative, process,, stdenv, temporary, unix }: mkderivation { pname = "editpipe"; version = " "; src =./.; islibrary = false; isexecutable = true; executablehaskelldepends = [ base optparse-applicative process temporary unix ]; homepage = " description = "Edit stdin using an editor"; license = stdenv.lib.licenses.bsd3; } $ nix-build -E 'with import <nixpkgs> { }; \ haskellpackages.callpackage./. { }'
26 Pinning with import ((import <nixpkgs> { }).fetchgit { url = " rev = "b2e431b49e25c69c7cb68dce79d b7c47"; sha256 = "0a45i9nfv2h9i4graqvam49d7w86gl3by2c1s"; }) { };
27 NixOS { config, pkgs,... }: { imports = [./hardware-configuration.nix ]; boot.loader.grub.enable = true; hardware.pulseaudio.enable = true; networking.hostname = "bmckenna-m3800-nixos"; environment.systempackages = with pkgs; [ gitfull file htop tmux which wget haskellpackages.xmobar ]; virtualisation.docker.enable = true; nixpkgs.config.allowunfree = true; hardware.bumblebee.enable = true; services.xserver = { enable = true; videodrivers = [ "intel" "vesa" ]; windowmanager.xmonad.enable = true; }; users.extrausers.brian = { uid = 1000; extragroups = [ "wheel" "docker" "vboxusers" ]; }; }
28 $ nixos-install $ nixos-rebuild switch
29 submenu "NixOS - All configurations" { menuentry "NixOS - Configuration 93 (cbf3d03)" { search linux ($drive1)//kernels/500k-linux bzimage systemconfig=/nix/store/qnhn-nixos-cbf3d03 init=/nix/store/qnhn-nixos-cbf3d03/init loglevel=4 initrd ($drive1)//kernels/ga2i7-initrd-initrd } menuentry "NixOS - Configuration 92 (40de598)" { search linux ($drive1)//kernels/462w-linux bzimage systemconfig=/nix/store/f25m-nixos-40de598 init=/nix/store/f25m-nixos-40de598/init loglevel=4 initrd ($drive1)//kernels/nhxk-initrd-initrd } }
30 $ ls /nix/var/nix/profiles/system activate init-interface-version append-initrd-secrets initrd bin kernel configuration-name kernel-modules etc kernel-params extra-dependencies nixos-version fine-tune sw firmware system init systemd
31 $ ls /bin sh $ ls /usr/bin env
32 #! /nix/store/hi4j-bash-4.4-p12/bin/bash systemconfig=/nix/store/1wrc-nixos-system-nixos.f0fac3b export PATH=/empty for i in /nix/store/ar26-coreutils-8.27 /nix/store/w9rn-gnugrep-3.0 /nix/store/rga4-findutils /nix/store/09il-glibc-2.25-bin /nix/store/rb2w-shadow-4.4 /nix/store/5zi0-net-tools-1.60_p /nix/store/7hn6-util-linux bin; do PATH=$PATH:$i/bin:$i/sbin done
33 ln -sfn /proc/self/fd /dev/fd ln -sfn /proc/self/fd/0 /dev/stdin ln -sfn /proc/self/fd/1 /dev/stdout ln -sfn /proc/self/fd/2 /dev/stderr mkdir -m p /bin ln -sfn "/nix/store/9kiv-bash-4.4-p12/bin/sh" /bin/sh /nix/store/qxq7-perl /bin/perl \ -I/nix/store/j8n-perl-File-Slurp/lib/perl5/site_perl \ /nix/store/r620-setup-etc.pl /nix/store/mayy-etc/etc /nix/store/qxq74-perl /bin/perl -w \ -I/nix/store/j8n-perl-File-Slurp/lib/perl5/site_perl \ -I/nix/store/xmfa-perl-JSON-2.90/lib/perl5/site_perl \ /nix/store/1hkp-update-users-groups.pl \ /nix/store/00cp-users-groups.json
34 mkdir -m p /var/log mkdir -m p /var/tmp mkdir -p /var/empty /nix/store/183f-openresolv-3.9.0/bin/resolvconf -u if! [ -e /etc/machine-id ]; then /nix/store/lvzx-systemd/bin/systemd-machine-id-setup fi mkdir -m p /usr/bin ln -sfn /nix/store/ar26-coreutils/bin/env /usr/bin/env ln -sfn "$(readlink -f "$systemconfig")" \ /run/current-system exit $_status
35 Docker FROM ubuntu RUN apt-get install -y software-properties-common RUN add-apt-repository ppa:chris-lea/node.js RUN apt-get update RUN apt-get install -y nodejs RUN mkdir /var/www ADD app.js /var/www/app.js CMD ["/usr/bin/node", "/var/www/app.js"]
36 Dockerfile Immutability Side effects
37 "Mostly functional" programming does not work.... The idea of "mostly functional programming" is unfeasible. It is impossible to make imperative programming languages safer by only partially removing implicit side effects. Leaving one kind of effect is often enough to simulate the very effect you just tried to remove. On the other hand, allowing effects to be "forgotten" in a pure language also causes mayhem in its own way.
38 dockertools.buildimage { name = "nix-docker"; fromimage = alpine_3_3; contents = redis; config = { Entrypoint = [ "/bin/redis" ]; }; }
39 dockertools.buildimage { name = config.networking.hostname; contents = [ config.system.build.binsh (linkas config.environment.usrbinenv "usr/bin/env") (linkas config.system.build.toplevel "run/current-system") config.system.build.etc ]; config = { Env = exportvariables; WorkingDir = "/root"; }; }
40 $ nix-build $ tar tf result././f58d61a874bedb7cdcb5a409ebb0c53b0656b880695/./f58d61a874bedb7cdcb5a409ebb0c53b0656b880695/version./f58d61a874bedb7cdcb5a409ebb0c53b0656b880695/json./f58d61a874bedb7cdcb5a409ebb0c53b0656b880695/layer.tar./1588e83015e9fd52df7c835b9e9621b54655ead5f32/./1588e83015e9fd52df7c835b9e9621b54655ead5f32/version./1588e83015e9fd52df7c835b9e9621b54655ead5f32/json./1588e83015e9fd52df7c835b9e9621b54655ead5f32/layer.tar./repositories./3dfdadbd8992aaf2435f9eb151f7e43ce38f1b3caf7/./3dfdadbd8992aaf2435f9eb151f7e43ce38f1b3caf7/version./3dfdadbd8992aaf2435f9eb151f7e43ce38f1b3caf7/json./3dfdadbd8992aaf2435f9eb151f7e43ce38f1b3caf7/layer.tar./f8a6eff170d41f381ddaa47f85d988371b89964d61c/./f8a6eff170d41f381ddaa47f85d988371b89964d61c/version./f8a6eff170d41f381ddaa47f85d988371b89964d61c/json./f8a6eff170d41f381ddaa47f85d988371b89964d61c/layer.tar
41 $ tar xof result./f8a6eff170d41f381ddaa47f85/json jq { "Size": , "architecture": "amd64", "config": { "AttachStderr": false, "AttachStdin": false, "AttachStdout": false, "Cmd": null, "Domainname": "", "Entrypoint": null, "Hostname": "b14cd ", "Image": "", "OpenStdin": false, "StdinOnce": false, "Tty": false, "User": "", "Volumes": null, "WorkingDir": "" }, "container": "b14cd " }
42 $ nix-build $ docker load -i result
43 Virtual machines
44 Qemu build $ nix-build '<nixpkgs/nixos>' -A vm
45 ISO build $ nix-build '<nixpkgs/nixos>' \ -A config.system.build.isoimage
46 import <nixpkgs/nixos/lib/make-disk-image.nix> rec { name = "nixos-vdi-${config.system.nixoslabel}"; config = (import <nixpkgs/nixos> { inherit configuration; }).config; inherit pkgs lib disksize; partitioned = true; } configfile = pkgs.writetext "configuration.nix" "{ imports = [ <virtualbox-image.nix> ]; }"; postvm = '' mkdir -p $out fn="$out/nixos-${config.system.nixoslabel}.vdi" ${pkgs.vmtools.qemu}/bin/qemu-img convert \ -f raw -O vdi \ $diskimage $fn rm $diskimage '';
47 Cross compilation
48 let pkgs = import <nixpkgs> { }; staticarm = drv: (drv.overridederivation (d: { buildinputs = d.buildinputs ++ [ pkgs.libccross.static ]; postunpack = '' export NIX_CROSS_CFLAGS_LINK="-static \ $NIX_CROSS_CFLAGS_LINK" ''; })).crossdrv; crosssystem = rec { config = "arm-linux-gnueabi"; bigendian = false; arch = "armv5te"; float = "soft"; withtls = true; libc = "glibc"; platform = pkgs.platforms.sheevaplug; openssl.system = "linux-generic32"; }; in staticarm (import <nixpkgs> {inherit crosssystem; }).rsync;
49 Tricks
50 patchshebangs $ patchshebangs. patching script interpreter paths in../example.sh: interpreter directive changed from "/usr/bin/bash" to "/nix/store/hi4j75r-bash-4.4-p12/bin/bash"
51 patchelf $ patchelf --print-interpreter random-binary /lib64/ld-linux.so.2 $ patchelf --set-interpreter \ $(< $NIX_CC/nix-support/dynamic-linker) random-binary $ patchelf --print-rpath random-binary /nix/store/m-file-5.28/lib:/nix/store/r-zlib-1.2.8/lib
52 libredirect open, open64, fopen, fopen64 xstat, xstat64, access posix_spawn, execv LD_PRELOAD="${libredirect}/lib/libredirect.so" NIX_REDIRECTS="/etc/example.conf=${myexampleconf}"
53 makewrapper $ wrapprogram $out/bin/foo \ --add-flags "--config=${fooconfig}"
54 Projects NixOps disnix Guix Dhall nix kubernetes
55 TODO Redesigned/single CLI interface Better Windows support More and better documentation IPFS!?
56 Resources Nix pills Nix manual nixpkgs manual NixOS manual
NIX THE PURELY FUNCTIONAL PACKAGE MANAGER MARIUSZ GLIWIŃSKI
NIX THE PURELY FUNCTIONAL PACKAGE MANAGER MARIUSZ GLIWIŃSKI TWO APPROACHES [] --[]+A--> [A] --[A]+B--> [A,B] --[A,B]-B--> [A] OR [] --[]+A--> [A] --[]+A+B--> [A,B] --[A,B]-B--> [A] OCCAM'S
More informationThe Nix Package Manager
The Nix Package Manager Eelco Dolstra e.dolstra@tudelft.nl Delft University of Technology, EWI, Department of Software Technology November 12, 2009 Nix Nix: purely functional package manager NixOS: Linux
More informationNixOS: A Purely Functional Linux Distribution
NixOS: A Purely Functional Linux Distribution ICFP 2008, Victoria, Canada Eelco Dolstra 1 Andres Löh 2 1 Delft University of Technology, EWI, Department of Software Technology 2 Utrecht University, Department
More informationContinuous Integration and Release Management with Nix
Continuous Integration and Release Management with Nix Institute of Information & Computing Sciences Utrecht University, The Netherlands July 14, 2004 Outline 1 Continuous Integration 2 Release Management
More informationRelease Management for Stratego/XT with Nix
Release Management for Stratego/XT with Nix Eelco Dolstra Center for Software Technology Utrecht University eelco@cs.uu.nl March 4, 2004 Eelco Dolstra SUD 04 1 The problem Software deployment (the act
More informationNixOS: The Purely Functional Linux Distribution
NixOS: The Purely Functional Linux Distribution Eelco Dolstra LogicBlox 21 November 2013 So what was wrong with the previous 298 distributions? So what was wrong with the previous 298 distributions? Upgrading
More informationService Configuration Management
Service Configuration Management SCM-12 Eelco Dolstra Martin Bravenboer Eelco Visser {eelco, martin, visser}@cs.uu.nl Universiteit Utrecht, Faculty of Science, Department of Information and Computing Sciences
More informationNixOS: A purely functional Linux distribution
JFP: page 1 of 39. c Cambridge University Press 2010 doi:10.1017/s0956796810000195 1 NixOS: A purely functional Linux distribution EELCO DOLSTRA Department of Software Technology, Delft University of Technology,
More informationswiftenv Documentation
swiftenv Documentation Release 1.3.0 Kyle Fuller Sep 27, 2017 Contents 1 The User Guide 3 1.1 Installation................................................ 3 1.2 Getting Started..............................................
More informationDockerfile Best Practices
Dockerfile Best Practices OpenRheinRuhr 2015 November 07th, 2015 1 Dockerfile Best Practices Outline About Dockerfile Best Practices Building Images This work is licensed under the Creative Commons Attribution-ShareAlike
More informationUsing Nix in production for the last two years
Using Nix in production for the last two years @ NixCon 2017 Domen Kožar Upstreamable nixpkgs forks? Why Github can't host the Linux Kernel Community Fast track documentation Give a Man a Fish, and You
More informationAtomic Upgrading of Distributed Systems
Atomic Upgrading of Distributed Systems Sander van der Burg Delft University of Technology, s.vanderburg@tudelft.nl Eelco Dolstra Delft University of Technology, e.dolstra@tudelft.nl Merijn de Jonge Philips
More informationGNU Guix: Scheme as a uniform OS admin and deployment interface
GNU Guix: Scheme as a uniform OS admin and deployment interface Ludovic Courtès Commercial Users of Functional Programming 24 September 2016, Nara, Japan $ guix package -i gcc-toolchain coreutils sed
More informationContainers. Pablo F. Ordóñez. October 18, 2018
Containers Pablo F. Ordóñez October 18, 2018 1 Welcome Song: Sola vaya Interpreter: La Sonora Ponceña 2 Goals Containers!= ( Moby-Dick ) Containers are part of the Linux Kernel Make your own container
More informationBuilding RPMs for Native Application Hosting
This section explains how you can build RPMs for native application hosting. Setting Up the Build Environment, page 1 Building Native RPMs, page 3 Setting Up the Build Environment This section describes
More informationContainer-based virtualization: Docker
Università degli Studi di Roma Tor Vergata Dipartimento di Ingegneria Civile e Ingegneria Informatica Container-based virtualization: Docker Corso di Sistemi Distribuiti e Cloud Computing A.A. 2018/19
More informationIntroduction to Shell Scripting
Introduction to Shell Scripting Evan Bollig and Geoffrey Womeldorff Presenter Yusong Liu Before we begin... Everyone please visit this page for example scripts and grab a crib sheet from the front http://www.scs.fsu.edu/~bollig/techseries
More informationA shell can be used in one of two ways:
Shell Scripting 1 A shell can be used in one of two ways: A command interpreter, used interactively A programming language, to write shell scripts (your own custom commands) 2 If we have a set of commands
More informationSDK. About the Cisco SDK. Installing the SDK. Procedure. This chapter contains the following sections:
This chapter contains the following sections: About the Cisco, page 1 Installing the, page 1 Using the to Build Applications, page 2 About ISO, page 3 Installing the ISO, page 3 Using the ISO to Build
More informationShell Scripting. Todd Kelley CST8207 Todd Kelley 1
Shell Scripting Todd Kelley kelleyt@algonquincollege.com CST8207 Todd Kelley 1 If we have a set of commands that we want to run on a regular basis, we could write a script A script acts as a Linux command,
More informationHands-on Keyboard: Cyber Experiments for Strategists and Policy Makers
Hands-on Keyboard: Cyber Experiments for Strategists and Policy Makers Review of the Linux File System and Linux Commands 1. Introduction Becoming adept at using the Linux OS requires gaining familiarity
More informationSingularity: container formats
Singularity Easy to install and configure Easy to run/use: no daemons no root works with scheduling systems User outside container == user inside container Access to host resources Mount (parts of) filesystems
More informationBe smart. Think open source.
Dockerfiles Be smart. Think open source. Dockerfiles What is a Dockerfile? Build instructions for Docker images Each command creates a layer in the image FROM centos:7 LABEL maintainer="foo.bar@example.com"
More informationfpm-cookery Documentation
fpm-cookery Documentation Release 0.33.0 Bernd Ahlers Jun 10, 2018 Contents 1 Features 3 2 Documentation Contents 5 2.1 Getting Started.............................................. 5 2.2 Using Hiera................................................
More informationEE516: Embedded Software Project 1. Setting Up Environment for Projects
EE516: Embedded Software Project 1. Setting Up Environment for Projects By Dong Jae Shin 2015. 09. 01. Contents Introduction to Projects of EE516 Tasks Setting Up Environment Virtual Machine Environment
More informationPlatform Migrator Technical Report TR
Platform Migrator Technical Report TR2018-990 Munir Contractor mmc691@nyu.edu Christophe Pradal christophe.pradal@inria.fr Dennis Shasha shasha@cs.nyu.edu May 12, 2018 CONTENTS: 1 Abstract 4 2 Platform
More informationIntroduction to Linux
Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Kisik Jeong (kisik@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating
More informationNexus Application Development - SDK
This chapter contains the following sections: About the Cisco SDK, page 1 Installing the SDK, page 1 Procedure for Installation and Environment Initialization, page 2 Using the SDK to Build Applications,
More informationManual Shell Script Linux If File Exists Wildcard
Manual Shell Script Linux If File Exists Wildcard This page shows common errors that Bash programmers make. If $file has wildcards in it (* or? or (), they will be expanded if there are files that match
More informationZephyr Kernel Installation & Setup Manual
Zephyr Kernel Installation & Setup Manual Zephyr kernel is a small footprint Single address space OS, i.e, it combines application specific code with a custom kernel to create a monolithic image that gets
More informationPerl and R Scripting for Biologists
Perl and R Scripting for Biologists Lukas Mueller PLBR 4092 Course overview Linux basics (today) Linux advanced (Aure, next week) Why Linux? Free open source operating system based on UNIX specifications
More informationIntroduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University
Introduction to Linux Woo-Yeong Jeong (wooyeong@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating system of a computer What is an
More informationLinux Kung Fu. Ross Ventresca UBNetDef, Fall 2017
Linux Kung Fu Ross Ventresca UBNetDef, Fall 2017 GOTO: https://apps.ubnetdef.org/ What is Linux? Linux generally refers to a group of Unix-like free and open source operating system distributions built
More informationContainer Security and new container technologies. Dan
Container Security and new container technologies Dan Walsh @rhatdan Please Stand Please read out loud all text in RED I Promise To say Container Registries Rather than Docker registries I Promise To say
More informationdiskimage-builder: Building Linux Images for Cloud / Virtualization / Container
diskimage-builder: Building Linux Images for Cloud / Virtualization / Container Let s start with a little bit of history: Once upon a time... About the Author Andreas Florath andreas@florath.net Mathematician
More informationIntroduction to Linux
Introduction to Linux Prof. Jin-Soo Kim( jinsookim@skku.edu) TA - Dong-Yun Lee (dylee@csl.skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu What is Linux? A Unix-like operating
More informationBuilding and Installing Software
Building and Installing Software On UD HPC Community Clusters William Totten Network & Systems Services Conventions when Installing Software Installation base directory /opt/shared /home/work/ lab/sw/name/version
More informationFreeBSD: packaging base
FreeBSD: packaging base A rainbow bikeshed Baptiste Daroussin bapt@freebsd.org BSDCan 2015 Ottawa June 13st, 2015 Packaging base BSDCan 2015 FreeBSD: packaging base 2 of 14 Packaging base? BSDCan 2015
More informationLinux Systems Administration Shell Scripting Basics. Mike Jager Network Startup Resource Center
Linux Systems Administration Shell Scripting Basics Mike Jager Network Startup Resource Center mike.jager@synack.co.nz These materials are licensed under the Creative Commons Attribution-NonCommercial
More informationOptimizing Docker Images
Optimizing Docker Images Brian DeHamer - CenturyLink Labs bdehamer CenturyLinkLabs @bdehamer @centurylinklabs Overview Images & Layers Minimizing Image Size Leveraging the Image Cache Dockerfile Tips
More informationFunctional Package Management with GNU Guix
Functional Package Management with GNU Guix Ricardo Wurmus rekado@elephly.net OpenTechSummit 14 May 2015 Good idea easy to install, upgrade, remove software dependency resolution centrally maintained repositories
More informationIntroduction. What is Linux? What is the difference between a client and a server?
Linux Kung Fu Introduction What is Linux? What is the difference between a client and a server? What is Linux? Linux generally refers to a group of Unix-like free and open-source operating system distributions
More informationHow to Write Tests for the AGL HW Test Infra. Jan-Simon Möller AGL Release Manager
How to Write Tests for the AGL HW Test Infra AGL AMM Oct 2017 Jan-Simon Möller AGL Release Manager jsmoeller@linuxfoundation.org Introduction, Topics Introduction Dipl.-Ing. Jan-Simon Möller jsmoeller@linuxfoundation.org
More informationIntegration of UNICORE Components into Linux Systems
Mitglied der Helmholtz-Gemeinschaft Integration of UNICORE Components into Linux Systems 15.12.2009 Rebecca Breu UNICORE Installation as of Now tgz or graphical installer all files installed into one directory
More informationmanifold Documentation
manifold Documentation Release 0.0.1 Open Source Robotics Foundation Mar 04, 2017 Contents 1 What is Manifold? 3 2 Installation 5 2.1 Ubuntu Linux............................................... 5 2.2
More informationLinux Shell Scripting. Linux System Administration COMP2018 Summer 2017
Linux Shell Scripting Linux System Administration COMP2018 Summer 2017 What is Scripting? Commands can be given to a computer by entering them into a command interpreter program, commonly called a shell
More informationUbuntu Manually Mount Cdrom Drive Command Line Vmware
Ubuntu Manually Mount Cdrom Drive Command Line Vmware On Windows 7 (64-bit) I installed VMware Player and then Ubuntu 12.04, then Mount the virtual CD drive, Launch a terminal, Use tar to uncompress. I
More informationDockerfile & docker CLI Cheat Sheet
Dockerfile & docker CLI Cheat Sheet Table of Contents Introduction 1 1. docker CLI Engine 2 1.1 Container Related s 2 1.2 Image Related s 4 1.3 Network Related s 5 1.4 Registry Related s 6 1.5 Volume Related
More informationConcurrent Variants, Isolation, and Feature Models in Software Deployment
Concurrent Variants, Isolation, and Feature Models in Software Deployment Eelco Dolstra Center for Software Technology Utrecht University eelco@cs.uu.nl February 27, 2003 1 Abstract Software deployment
More informationMV V310 Android 4.0 Compilation
MV V310 Android 4.0 Compilation Microvision Co., Ltd. Document Information Version 1.0 File Name MVV310 Android Compilation.doc Date 2012. 4. 17 Satus Working Revision History Date Version Update Descriptions
More informationMy operating system is old but I don't care : I'm using NIX! B.Bzeznik BUX meeting, Vilnius 22/03/2016
My operating system is old but I don't care : I'm using NIX! B.Bzeznik BUX meeting, Vilnius 22/03/2016 CIMENT is the computing center of the University of Grenoble CIMENT computing platforms 132Tflops
More informationFormatting 1. Commands starting with $ are Linux console commands on the host PC:
Custom Kernel Guide by Arrvindh Shriraman Last update: April 1, 2016 This document guides the user through: 1. Downloading and compiling the Linux kernel's source code. 2. Running a custom kernel inside
More informationMAGPIE Installation Guide (version 1.0)
MAGPIE Installation Guide (version 1.0) June 2017 Authors: Sophiane Senni, Pierre-Yves Péneau, Abdoulaye Gamatié 1 Contents 1 About this guide 3 2 Framework installation 4 2.1 Dependencies...................................
More informationLinux Kung Fu. Stephen James UBNetDef, Spring 2017
Linux Kung Fu Stephen James UBNetDef, Spring 2017 Introduction What is Linux? What is the difference between a client and a server? What is Linux? Linux generally refers to a group of Unix-like free and
More informationINTRODUCTION TO LINUX
INTRODUCTION TO LINUX REALLY SHORT HISTORY Before GNU/Linux there were DOS, MAC and UNIX. All systems were proprietary. The GNU project started in the early 80s by Richard Stallman Goal to make a free
More informationEmbedded Linux. A Tour inside ARM's Kernel
Embedded Linux A Tour inside ARM's Kernel Contents 1. Shell basics 2. Introduction to Embedded Linux 3. Kernel Programming for Module / Driver Installation 4. Module / Device Driver in RPi 5. Cross Compiling
More informationManual Shell Script Linux If File Exists And
Manual Shell Script Linux If File Exists And Is Not Empty read Bash Conditional Expressions in the manual, and use the -r and -w operators glenn jackman Dec 10 '14 at -s FILE True if file exists and is
More informationSystem Programming. Unix Shells
Content : Unix shells by Dr. A. Habed School of Computer Science University of Windsor adlane@cs.uwindsor.ca http://cs.uwindsor.ca/ adlane/60-256 Content Content 1 Introduction 2 Interactive and non-interactive
More informationGNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018
GNU/Linux 101 Casey McLaughlin Research Computing Center Spring Workshop Series 2018 rccworkshop IC;3df4mu bash-2.1~# man workshop Linux101 RCC Workshop L101 OBJECTIVES - Operating system concepts - Linux
More informationFtp Command Line Commands Linux Example Windows Put
Ftp Command Line Commands Linux Example Windows Put Examples of typical uses of the command ftp. This lists the commands that you can use to show the directory contents, transfer files, and delete files.
More informationu-root: / with the convenience of scripting and the performance of compilation
u-root: / with the convenience of scripting and the performance of compilation Ron Minnich Google Andrey Mirtchovski Cisco Outline What u-root is Why we re doing it How it all works Try it! sudo docker
More informationContents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...
Contents Note: pay attention to where you are........................................... 1 Note: Plaintext version................................................... 1 Hello World of the Bash shell 2 Accessing
More information02. At the command prompt, type usermod -l bozo bozo2 and press Enter to change the login name for the user bozo2 back to bozo. => steps 03.
Laboratory Exercises: ===================== Complete the following laboratory exercises. All steps are numbered but not every step includes a question. You only need to record answers for those steps that
More informationLinux Essentials Objectives Topics:
Linux Essentials Linux Essentials is a professional development certificate program that covers basic knowledge for those working and studying Open Source and various distributions of Linux. Exam Objectives
More informationBjörn Döbel. Microkernel-Based Operating Systems. Exercise 3: Virtualization
Faculty of Computer Science Institute for System Architecture, Operating Systems Group Björn Döbel Microkernel-Based Operating Systems Exercise 3: Virtualization Emulation Virtualization Emulation / Simulation
More informationIntroduction to Linux
Introduction to Linux Mukesh Pund Principal Scientist, NISCAIR, New Delhi, India History In 1969, a team of developers developed a new operating system called Unix which was written using C Linus Torvalds,
More informationIntroduction to Containers
Introduction to Containers Shawfeng Dong Principal Cyberinfrastructure Engineer University of California, Santa Cruz What are Containers? Containerization, aka operating-system-level virtualization, refers
More informationLinux Command Line Interface. December 27, 2017
Linux Command Line Interface December 27, 2017 Foreword It is supposed to be a refresher (?!) If you are familiar with UNIX/Linux/MacOS X CLI, this is going to be boring... I will not talk about editors
More informationNetwork softwarization Lab session 2: OS Virtualization Networking
Network softwarization Lab session 2: OS Virtualization Networking Nicolas Herbaut David Bourasseau Daniel Negru December 16, 2015 1 Introduction 1.1 Discovering docker 1.1.1 Installation Please launch
More informationIntroduction Variables Helper commands Control Flow Constructs Basic Plumbing. Bash Scripting. Alessandro Barenghi
Bash Scripting Alessandro Barenghi Dipartimento di Elettronica, Informazione e Bioingegneria Politecnico di Milano alessandro.barenghi - at - polimi.it April 28, 2015 Introduction The bash command shell
More informationLinux Systems Administration Getting Started with Linux
Linux Systems Administration Getting Started with Linux Network Startup Resource Center www.nsrc.org These materials are licensed under the Creative Commons Attribution-NonCommercial 4.0 International
More informationUNIX System Programming Lecture 3: BASH Programming
UNIX System Programming Outline Filesystems Redirection Shell Programming Reference BLP: Chapter 2 BFAQ: Bash FAQ BMAN: Bash man page BPRI: Bash Programming Introduction BABS: Advanced Bash Scripting Guide
More informationEngineering Robust Server Software
Engineering Robust Server Software Containers Isolation Isolation: keep different programs separate Good for security Might also consider performance isolation Also has security implications (side channel
More informationFilesystem Hierarchy Operating systems I800 Edmund Laugasson
Filesystem Hierarchy Operating systems I800 Edmund Laugasson edmund.laugasson@itcollege.ee There has been used materials from Margus Ernits, Katrin Loodus when creating current slides. Current document
More informationProject 1 Setup. Some relevant details are the output of: 1. uname -a 2. cat /etc/*release 3. whereis java 4. java -version 5.
Project 1 Setup The purpose of this document is to help you to prepare your development machine for the project by: 1. Installing any missing tools 2. Setting up required environment variables and paths
More informationRed Hat Containers Cheat Sheet
Red Hat Containers Cheat Sheet Table of Contents Introduction Commands Key 1. Container Runtime Engine 1.A) Container Related Commands 1.B) Image Related Commands 1.C) Network Related Commands 1.D) Registry
More informationBuilding Debian-Based Products: Experiences in Collaboration
Building Debian-Based Products: Experiences in Collaboration Kazuhiro Hayashi, Toshiba Corporation (Baurzhan Ismagulov, ilbers GmbH) Jun 23, 2017 Motivation Deby and Isar : Both use Debian Have common
More informationCS197U: A Hands on Introduction to Unix
CS197U: A Hands on Introduction to Unix Lecture 11: WWW and Wrap up Tian Guo University of Massachusetts Amherst CICS 1 Reminders Assignment 4 was graded and scores on Moodle Assignment 5 was due and you
More informationLinux & Shell Programming 2014
Unit -1: Introduction to UNIX/LINUX Operating System Practical Practice Questions: Find errors (if any) otherwise write output or interpretation of following commands. (Consider default shell is bash shell.)
More informationCSC UNIX System, Spring 2015
CSC 352 - UNIX System, Spring 2015 Study guide for the CSC352 midterm exam (20% of grade). Dr. Dale E. Parson, http://faculty.kutztown.edu/parson We will have a midterm on March 19 on material we have
More informationSingularity: Containers for High-Performance Computing. Grigory Shamov Nov 21, 2017
Singularity: Containers for High-Performance Computing Grigory Shamov Nov 21, 2017 Outline Software and High Performance Computing: Installation/Maintenance of the HPC Software stack Why containers and
More informationTravis Cardwell Technical Meeting
.. Introduction to Docker Travis Cardwell Tokyo Linux Users Group 2014-01-18 Technical Meeting Presentation Motivation OS-level virtualization is becoming accessible Docker makes it very easy to experiment
More informationGUT. GUT Installation Guide
Date : 02 Feb 2009 1/5 GUT Table of Contents 1 Introduction...2 2 Installing GUT...2 2.1 Optional Extensions...2 2.2 Installing from source...2 2.3 Installing the Linux binary package...4 2.4 Installing
More informationGUT. GUT Installation Guide
Date : 17 Mar 2011 1/6 GUT Contents 1 Introduction...2 2 Installing GUT...2 2.1 Optional Extensions...2 2.2 Installation using the Binary package...2 2.2.1 Linux or Mac OS X...2 2.2.2 Windows...4 2.3 Installing
More informationDAVE LIDDAMENT INTRODUCTION TO BASH
DAVE LIDDAMENT INTRODUCTION TO BASH @daveliddament FORMAT Short lectures Practical exercises (help each other) Write scripts LEARNING OBJECTIVES What is Bash When should you use Bash Basic concepts of
More informationShell scripting and system variables. HORT Lecture 5 Instructor: Kranthi Varala
Shell scripting and system variables HORT 59000 Lecture 5 Instructor: Kranthi Varala Text editors Programs built to assist creation and manipulation of text files, typically scripts. nano : easy-to-learn,
More informationEmbedded Systems Programming
Embedded Systems Programming OS Linux - Toolchain Iwona Kochańska Gdansk University of Technology Embedded software Toolchain compiler and tools for hardwaredependent software developement Bootloader initializes
More informationGNU make... Martin Ohlerich, Parallel Programming of High Performance Systems
... Martin Ohlerich, Martin.Ohlerich@lrz.de Parallel Programming of High Performance Systems Outline 1 2 3 Leibniz Rechenzentrum 2 / 42 Outline 1 2 3 Leibniz Rechenzentrum 3 / 42 Common Situation Larger
More informationDocker A FRAMEWORK FOR DATA INTENSIVE COMPUTING
Docker A FRAMEWORK FOR DATA INTENSIVE COMPUTING Agenda Intro / Prep Environments Day 1: Docker Deep Dive Day 2: Kubernetes Deep Dive Day 3: Advanced Kubernetes: Concepts, Management, Middleware Day 4:
More informationNavigating the Guix Subsystems
Navigating the Guix Subsystems Ludovic Courtès GNU Hackers Meeting, Rennes, August 2016 The Emacs of distros When large numbers of nontechnical workers are using a programmable editor, they will be tempted
More informationChapter 1 - Introduction. September 8, 2016
Chapter 1 - Introduction September 8, 2016 Introduction Overview of Linux/Unix Shells Commands: built-in, aliases, program invocations, alternation and iteration Finding more information: man, info Help
More informationShell Scripting. Jeremy Sanders. October 2011
Shell Scripting Jeremy Sanders October 2011 1 Introduction If you use your computer for repetitive tasks you will find scripting invaluable (one of the advantages of a command-line interface). Basically
More informationIntel Accelerator Functional Unit (AFU) Simulation Environment (ASE) Quick Start User Guide
Intel Accelerator Functional Unit (AFU) Simulation Environment (ASE) Quick Start User Guide Updated for Intel Acceleration Stack: 1.0 Production Subscribe Send Feedback Latest document on the web: PDF
More informationPhp Scripts If Then Else Linux Bash Shell
Php Scripts If Then Else Linux Bash Shell I am using awk as part of and if then else statement. KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here. I just wrote
More informationPiranaJS installation guide
PiranaJS installation guide Ron Keizer, January 2015 Introduction PiranaJS is the web-based version of Pirana, a workbench for pharmacometricians aimed at facilitating the use of NONMEM, PsN, R/Xpose,
More informationLinux shell scripting Getting started *
Linux shell scripting Getting started * David Morgan *based on chapter by the same name in Classic Shell Scripting by Robbins and Beebe What s s a script? text file containing commands executed as a unit
More informationHow to Use This Lab Manual
3 Contents How to Use This Lab Manual........................................ 5 Lab 1: Setting Up the Student System.................................. 7 Lab 2: Installing Fedora............................................
More informationIntroduction of Linux
Introduction of Linux 阳 oslab2018_class1@163.com 寅 oslab2018_class2@163.com PART I Brief Introduction Basic Conceptions & Environment Install & Configure a Virtual Machine Basic Commands PART II Shell
More informationR- installation and adminstration under Linux for dummie
R- installation and adminstration under Linux for dummies University of British Columbia Nov 8, 2012 Outline 1. Basic introduction of Linux Why Linux (department servers)? Some terminology Tools for windows
More informationManual Shell Script Linux If Not Exist Directory Does
Manual Shell Script Linux If Not Exist Directory Does Bash can be configured to be POSIX-confor mant by default. and then a much longer manual available using info (usually they refer to the info page
More information