System administration basics



Similar documents
Create a virtual machine at your assigned virtual server. Use the following specs

EXPLORING LINUX KERNEL: THE EASY WAY!

RocketRAID 2640/2642 SAS Controller Ubuntu Linux Installation Guide

HTTP-FUSE PS3 Linux: an internet boot framework with kboot

USB 2.0 Flash Drive User Manual

LSN 10 Linux Overview

Linux System Administration on Red Hat

The Linux System. o Updating without touching the user's files and configurations.

IT6204 Systems & Network Administration. (Optional)

Support Notes for SUSE LINUX Enterprise Server 9 Service Pack 3 for the Intel Itanium 2 Processor Family

Procedure to Create and Duplicate Master LiveUSB Stick

II. Installing Debian Linux:

Acronis Backup & Recovery 10 Server for Linux. Quick Start Guide

PARALLELS SERVER 4 BARE METAL README

RocketRAID 174x SATA Controller Ubuntu Linux Installation Guide

Cable Internet Connection & Sharing using Red Hat 7.2 (Version 1.0, )

Technical Note TN_146. Creating Android Images for Application Development

CS197U: A Hands on Introduction to Unix

2. Boot using the Debian Net Install cd and when prompted to continue type "linux26", this will load the 2.6 kernel

APPLICATION NOTE. How to build pylon applications for ARM

Oracle VM Server Recovery Guide. Version 8.2

PARALLELS SERVER BARE METAL 5.0 README

On Disk Encryption with Red Hat Enterprise Linux

Getting started with ARM-Linux

Ubuntu Professional Training Course Overview (E-learning, Ubuntu LTS)

Acronis Backup & Recovery 10 Server for Linux. Installation Guide

IP Address: the per-network unique identifier used to find you on a network

Installing Sun's VirtualBox on Windows XP and setting up an Ubuntu VM

======================================================= Tools to wipe out unwanted data: =======================================================

Linux Template Creation Guide. How to build your own Linux VM templates for deployment in Cloudturk.

Backtrack 4 Bootable USB Thumb Drive with Full Disk Encryption

Red Hat Linux Networking

Embedded Linux development training 4 days session

AlienVault. Unified Security Management x Offline Update and Software Restoration Procedures

Deploying a Virtual Machine (Instance) using a Template via CloudStack UI in v4.5.x (procedure valid until Oct 2015)

Creating a Cray System Management Workstation (SMW) Bootable Backup Drive

Support Notes for SUSE LINUX Enterprise Server 10 Service Pack 2 for HP Integrity Servers

Using Symantec NetBackup with Symantec Security Information Manager 4.5

Cloud.com CloudStack Community Edition 2.1 Beta Installation Guide

It should be noted that the installer will delete any existing partitions on your disk in order to install the software required to use BLËSK.

Get quick control over your Linux server with server commands

Installing MooseFS Step by Step Tutorial

File Storage Operation Manual

HOWTO: Set up a Vyatta device with ThreatSTOP in router mode

CDH installation & Application Test Report

LOCKSS on LINUX. Network Data Transition 02/17/2011

Acronis Backup & Recovery 10 Server for Linux. Update 5. Installation Guide

Version 1.0. File System. Network Settings

Dell Proximity Printing Solution. Installation Guide

BackTrack Hard Drive Installation

The current version installed on your server is el6.x86_64 and it's the latest available.

Abstract. Microsoft Corporation Published: August 2009

Lab Objectives & Turn In

Buildroot for Vortex86EX (2016/04/20)

SAP HANA Disaster Recovery with Asynchronous Storage Replication Using Snap Creator and SnapMirror

BrightStor ARCserve Backup for Linux

The BackTrack Successor

Introduction to AIX 6L System Administration Course Summary

10 STEPS TO YOUR FIRST QNX PROGRAM. QUICKSTART GUIDE Second Edition

How to Backup XenServer VM with VirtualIQ

Linux Embedded devices with PicoDebian Martin Noha

Acronis Backup & Recovery 10 Server for Linux. Installation Guide

Scalable Linux Clusters with LVS

Configure NFS Staging for ACS 5.x Backup on Windows and Linux

RH033 Red Hat Linux Essentials or equivalent experience with Red Hat Linux..

Q N X S O F T W A R E D E V E L O P M E N T P L A T F O R M v Steps to Developing a QNX Program Quickstart Guide

QuickBooks Enterprise Solutions. Linux Database Server Manager Installation and Configuration Guide

Private Server and Physical Server Backup and Restoration:

ULTEO OPEN VIRTUAL DESKTOP UBUNTU (PRECISE PANGOLIN) SUPPORT

Novell Identity Manager Resource Kit

Installing Virtual Coordinator (VC) in Linux Systems that use RPM (Red Hat, Fedora, CentOS) Document # 15807A1-103 Date: Aug 06, 2012

How to Restore a Linux Server Using Bare Metal Restore

Configuring your network settings to use Google Public DNS

Computer Science and Engineering Linux Cisco VPN Client Installation and Setup Guide

Remote Unix Lab Environment (RULE)

Linux Overview. The Senator Patrick Leahy Center for Digital Investigation. Champlain College. Written by: Josh Lowery

ITIS 2110 Lab 11: Domain Name Server. Tyler Everhart 11/12/2010

Restoring a Suse Linux Enterprise Server 9 64 Bit on Dissimilar Hardware with CBMR for Linux 1.02

UNIX - FILE SYSTEM BASICS

OS Installation Guide Red Hat Linux 9.0

HOWTO: Set up a Vyatta device with ThreatSTOP in bridge mode

Survey of Filesystems for Embedded Linux. Presented by Gene Sally CELF

CYAN SECURE WEB APPLIANCE. User interface manual

Red Hat Linux 7.2 Installation Guide

Project 4: IP over DNS Due: 11:59 PM, Dec 14, 2015

Acronis Backup & Recovery 10 Server for Linux. Installation Guide

Xen Virtualization Software

Total Backup Recovery Server for Linux. User s Guide

Clonezilla: Clone As Free As You Want

Installing Proview on an Windows XP machine

NAS 109 Using NAS with Linux

Deploying Windows Streaming Media Servers NLB Cluster and metasan

Implementing SAN & NAS with Linux by Mark Manoukian & Roy Koh

How To Install Acronis Backup & Recovery 11.5 On A Linux Computer

Verax Service Desk Installation Guide for UNIX and Windows

LAB THREE STATIC ROUTING

Using iscsi with BackupAssist. User Guide

SUSE Manager in the Public Cloud. SUSE Manager Server in the Public Cloud

HARFORD COMMUNITY COLLEGE 401 Thomas Run Road Bel Air, MD Course Outline CIS INTRODUCTION TO UNIX

Transcription:

Embedded Linux Training System administration basics Michael Opdenacker Thomas Petazzoni Free Electrons Copyright 2009, Free Electrons. Creative Commons BY SA 3.0 license Latest update: Dec 20, 2010, Document sources, updates and translations: http://free electrons.com/docs/command line Corrections, suggestions, contributions and translations are welcome! 1

System administration basics Networking 2

Network setup (1) ifconfig a Prints details about all the network interfaces available on your system. ifconfig eth0 Lists details about the eth0 interface ifconfig eth0 192.168.0.100 Assigns the 192.168.0.100 IP address to eth0 (1 IP address per interface). ifconfig eth0 down Shuts down the eth0 interface (frees its IP address). 3

Network setup (2) route add default gw 192.168.0.1 Sets the default route for packets outside the local network. The gateway (here 192.168.0.1) is responsible for sending them to the next gateway, etc., until the final destination. route n Lists the existing routes route del default or route del <IP> Deletes the given route Useful to redefine a new route. n option: immediately displays ip addresses instead of trying to find their domain names 4

Network setup (3) Your programs need to know what IP address corresponds to a given host name (such as kernel.org) Domain Name Servers (DNS) take care of this. You just have to specify the IP address of 1 or more DNS servers in your /etc/resolv.conf file: nameserver 217.19.192.132 nameserver 212.27.32.177 The changes take effect immediately! 5

Network testing First, try to ping the IP address of your gateway. This will confirm that your network adapter works fine. Then, make sure you can ping the name server IP address, which will confirm that your gateway is configured properly. Finally, make sure you can ping any host using its name, which will confirm that the nameserver configuration is correct. 6

System administration basics Filesystems and devices 7

Creating filesystems Examples mkfs.ext2 /dev/sda1 Formats your USB key (/dev/sda1: 1 st partition raw data) in ext2 format. mkfs.ext2 F disk.img Formats a disk image file in ext2 format mkfs.vfat v F 32 /dev/sda1 ( v: verbose) Formats your USB key back to FAT32 format. mkfs.vfat v F 32 disk.img Formats a disk image file in FAT32 format. F: force. Execute even if not a real device file. Blank disk images can be created as in the below example (64 MB file): dd if=/dev/zero of=disk.img bs=1m count=64 8

Mounting devices (1) To make filesystems on any device (internal or external storage) visible on your system, you have to mount them. The first time, create a mount point in your system: mkdir /mnt/usbdisk (example) Now, mount it: mount t vfat /dev/sda1 /mnt/usbdisk /dev/sda1: physical device t: specifies the filesystem (format) type (ext2, ext3, vfat, reiserfs, iso9660...) raw data (file descriptors and file contents) mount file structure 9

Mounting devices (2) You can also mount a filesystem image stored in a regular file (loop devices) Useful to develop filesystems for another machine Useful to access the contents of an ISO cdrom image without having to burn it. Useful to have a Linux filesystem inside a file in a Windows partition. cp /dev/sda1 usbkey.img mount o loop t vfat usbkey.img /mnt/usbdisk 10

Listing mounted filesystems Just use the mount command with no argument: /dev/hda6 on / type ext3 (rw,noatime) none on /proc type proc (rw,noatime) none on /sys type sysfs (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) usbfs on /proc/bus/usb type usbfs (rw) /dev/hda4 on /data type ext3 (rw,noatime) none on /dev/shm type tmpfs (rw) /dev/hda1 on /win type vfat (rw,uid=501,gid=501) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) 11

Unmounting devices umount /mnt/usbdisk Commits all pending writes and unmounts the given device, which can then be removed in a safe way. To be able to unmount a device, you have to close all the open files in it: Close applications opening data in the mounted partition Make sure that none of your shells have a working directory in this mount point. You can run the lsof <mount point> command (list open files) to view which processes still have open files in the mounted partition. 12

System administration basics Package management 13

Beware of the dark side of root root user privileges are only needed for very specific tasks with security risks: mounting, creating device files, loading drivers, starting networking, changing file ownership, package upgrades... Even if you have the root password, your regular account should be sufficient for 99.9 % of your tasks (unless you are a system administrator). In a training session, it is acceptable to use root. In real life, you may not even have access to this account, or put your systems and data at risk if you do. 14

Using the root account In case you really want to use root... If you have the root password: su (switch user) In modern distributions, the sudo command gives you access to some root privileges with your own user password. Example: sudo mount /dev/hda4 /home 15

Software packages The distribution mechanism for software in GNU/Linux is different from the one in Windows Linux distributions provides a central and coherent way of installing, updating and removing applications and libraries : packages Packages contains the application or library files, and associated meta information, such as the version and the dependencies.deb on Debian and Ubuntu,.rpm on Mandriva, Fedora, OpenSUSE Packages are stored in repositories, usually on HTTP or FTP servers One should only use packages from official repositories of its distribution, unless strictly required. 16

Managing software packages (1) Instructions for Debian based GNU/Linux systems (Debian, Ubuntu...) Package repositories are specified in /etc/apt/sources.list To update package repository lists: sudo apt get update To find the name of a package to install, the best is to use the search engine on http://packages.debian.org or on http://packages.ubuntu.com. You may also use: apt cache search <keyword> 17

Managing software packages (2) To install a given package: sudo apt get install <package> To remove a given package: sudo apt get remove <package> To install all available package updates: sudo apt get dist upgrade Get information about a package: sudo apt cache show <package> Graphical interfaces Synaptic for GNOME Adept for KDE Further details on package management: http://www.debian.org/doc/manuals/apt howto/ 18

Shutting down halt Immediately halts the system. reboot Immediately reboots the system. [Ctrl][Alt][Del] Also works on GNU/Linux to reboot. Embedded systems: you must use an implementation of init and can specify any key combination in /etc/inittab. 19

Related documents All our technical presentations on http://free electrons.com/docs Linux kernel Device drivers Architecture specifics Embedded Linux system development

How to help You can help us to improve and maintain this document... By sending corrections, suggestions, contributions and translations By asking your organization to order development, consulting and training services performed by the authors of these documents (see http://free electrons.com/). By sharing this document with your friends, colleagues and with the local Free Software community. By adding links on your website to our on line materials, to increase their visibility in search engine results.

Linux kernel Linux device drivers Board support code Mainstreaming kernel code Kernel debugging Embedded Linux Training All materials released with a free license! Unix and GNU/Linux basics Linux kernel and drivers development Real time Linux, uclinux Development and profiling tools Lightweight tools for embedded systems Root filesystem creation Audio and multimedia System optimization Free Electrons Our services Custom Development System integration Embedded Linux demos and prototypes System optimization Application and interface development Consulting and technical support Help in decision making System architecture System design and performance review Development tool and application support Investigating issues and fixing tool bugs