Linux Quickref Linux Version 2.0.2 October 2003 Usermount Executes Graphical Utility for Contents Mounting and Unmounting Topic Page Filesystems

Total Page:16

File Type:pdf, Size:1020Kb

Linux Quickref Linux Version 2.0.2 October 2003 Usermount Executes Graphical Utility for Contents Mounting and Unmounting Topic Page Filesystems Linux QuickRef Linux version 2.0.2 October 2003 usermount Executes graphical utility for Contents mounting and unmounting Topic Page filesystems. Mounting Filesystems...............................................1 Finding Files and Text Within Files..........................1 exportfs -ra Re-apply NFS export directives as Move Copy, Delete and View Files...........................1-2 listed in /etc/exports. Meta Characters.......................................................2 Regular Expressions................................................2 Finding Files and Text Within Files File Permissions.......................................................2 Symbolic Links..........................................................2-3 find / -name filename Starting at the / directory, find the chmod Modes...........................................................3 file “filename”. User Administration..................................................3 Printing.....................................................................3 find / -name Starting at the / directory, find the man Pages...............................................................3-4 “*string*” file containing the word “string”. Shutdown & Reboot..................................................4 Installing Software....................................................4 find / -perm +4000 Find existing files on the system Modules....................................................................4 -user root -print that have their SUID root Configuration Files...................................................4-5 permissions set. System Services.......................................................5 Crontab.....................................................................5 find / -perm +2000 Find existing files on the system Networking................................................................5 -group <group> that have their SGID permissions Archiving...................................................................5 -print set. Bash Shell................................................................5-6 Vim / Vi Editor...........................................................6 find / -nouser -print Find existing files on the system X Windows................................................................6 that don't belong to any user listed ssh and GnuPG........................................................6 in /etc/passwd. Tips & Tricks.............................................................6-7 GNU/Linux Links.......................................................7-8 info Lists the commands and utilities installed with brief description as to what they are used for, or do. Unless noted, all commands are to be entered on one line (use the " \" continuation character if needed). locate filename Locate a file “filename” using the updatedb database (see next). Mounting Filesystems updatedb Create or update the database mount -t msdos Mount an MS-DOS formatted used by the locate command. /dev/fd0H1440 floppy disk at /mnt/floppy. /mnt/floppy apropos subject List man pages for “subject”, searches the whatis database for mount -t iso9660 Mount a CD-ROM drive at strings. /dev/cdrom /mnt/cdrom. /mnt/cdrom whatis Search the whatis database for complete words. mount -t vfat Mount a VFAT hard drive partition /dev/hda1 /mnt/win hda1 at /mnt/win. makewhatis Create or update the database used by whatis and apropos mount -t smbfs Mount a SMB share located at commands. //system/share/ //system/share at /mnt/samba. /mnt/samba which filename Show the subdirectory containing the executable file “filename”. mount -t iso9660 Mount an ISO image as a -o loop image.iso filesystem at /mnt/iso using the grep –r textstring Starting with the directory “/dir”, /mnt/iso loopback device. /dir recursively find and list all files containing the string “textstring”. mount -t ext2 Mount a Linux filesystem /dev/pda formatted SyQuest EZ-Drive Move Copy, Delete and View Files /mnt/ezdrive cartridge at /mnt/ezdrive. mv filename Move the file “filename” to the umount /mnt/cdrom Unmount the CD-ROM. /home/dirname directory /home/dirname. cp filename Copy the file “filename” to the /home/dirname directory /home/dirname. Linux QuickRef 1 rm name Remove the file or directory + Match one or more repeated “name”. occurrences of the previous character. rm -rf dir Remove the entire directory “dir”, forcing the removal of included ? Match zero or one repeated files and subdirectories occurrences of the previous recursively as well. character. ls -l List files in current directory in ^ Matches an expression that long format. follows it at the beginning of a line. Needs double quotes when used ls -F List files in current directory and with grep. indicate the file types. $ Matches the regular expression ls -laC List all files in current directory in that precedes it at the end of a long format and display in line. Needs single quotes when columns. used with grep. cat filename Display the file “filename”. [a-z0-9] Single-character range (“a” through “z” or “0” through “0”). more filename Display the file “filename” one page at a time. Advance pages by [abc123] Single-character choice (“a”, “b”, pressing the spacebar. “c”, “1”, “2” or “3”). less filename Display the file “filename” one [^x,y,z] Single-character choice, but not page at a time. Advance pages by the characters “x”, “y” or “z”. pressing the spacebar, backup with the “b” key. (abc) Grouped characters “abc”. zless filename Same as above, only used with \ Used to escape regular files compressed with gzip. expression characters such as +, *, and ^ to include the literal head filename Display the first 10 lines of the file character in a match. “filename”. File Permissions head -25 filename Display the first 25 lines of the file “filename”. User Group Others d r w x r w x r w x tail filename Display the last 10 lines of the file “filename”. File Type Execute tail -25 filename Display the last 25 lines of the file “filename”. -=file Write d=directory Meta Characters l=link Read b/c=block/char device * Multiple-character wildcard. ? Single-character wildcard. When the command “ls –l” is used, a list of file names is displayed. The first column in this list details the file type and the [a-z0-9] Single-character character range permissions applied to the file. If a permission is denied for a set, (“a” through “z” or “0” through “0”). User (Owner), Group and Others, it is represented by a –. [abc123] Single-character choice (“a”, “b”, File permissions are altered by giving the “c”, “1”, “2” or “3”). “chmod” command and the appropriate octal Read = 4 code for each set. Ex.: [!xyz] Single-character choice, but as Write = 2 chmod 764 filename not the characters “x”, “y” or “z”. Execute = 1 will make the file “filename” r-w-x for the user, Regular Expressions r-w for the group, and r for any others. Match a single character (functionally equivalent to how the Symbolic Links '?' character works in glob symlink -r / List all the symbolic links on the expansions). system. * Match zero or more repeated symlink -rv / | fgrep Find all symbolic links that are occurrences of the previous "dangling" "dangling", excluding other character. mounted filesystems. ln -l linkname Display the link-path for a link. Linux QuickRef 2 find . -type l Find all symbolic links and show lpr Print a file. -exec ls -l {} \; what they point to. lprm Remove jobs from print queue. chmod Modes lprm -a Remove all jobs from the print chmod 600 Read and write permissions for queue for the logged user. user only. lprm -a all Remove all jobs for all users from chmod 700 Read, write and execute the print queue (run as root). permissions for user only. lpc Printer control tool. chmod 755 Full permission for user, read and execute for group and others. printtool Run the X Windows printer setup utility. chmod 711 Full permission for user, execute for group and others. ma n Pages chmod 444 Read permissions only for man -k word Display man pages containing everybody. “word”. chmod +x filename Make the file “filename” man subject | Print the man page “subject” as executable for everybody; user, col -b | lpr plain text. group and others. man -t subject | Print the man page “subject” as chmod go-w filename Revoke write permissions for col -b | lpr Postscript. group and others on the file “filename”. Manual pages are organized into topics: /usr/man/man1 Commands - Commands you run from chmod ug=r filename Set the permissions to readable within a shell. only for user and group on the file “filename”. /usr/man/man2 System Calls - Documentation for kernel functions. chmod a=r,u+w Set the permissions to readable filename only for all (everybody) and add /usr/man/man3 Library Calls - Manual pages for libc write-able for user on the file functions. “filename”. /usr/man/man4 Special Files - Information about files in User Administration the /dev/ directory. useradd username Create a new user account named /usr/man/man5 File Formats - Details of formats for / “username”. etc/passwd and other files. passwd username Assign a password to “username”. /usr/man/man6 Games. su -or- su - Switch user to root, or root and to /usr/man/man7 Macro Packages - Descriptions of the Linux include root’s set environment file system, manual pages, and others. (must know root password to use). /usr/man/man8 System Management - Manual pages for su -c "command" Run “command” (include any root operator utilities. options within the quotes) as root. /usr/man/man9 Kernel Routines - Documentation on Linux su username Switch
Recommended publications
  • Linux on the Road
    Linux on the Road Linux with Laptops, Notebooks, PDAs, Mobile Phones and Other Portable Devices Werner Heuser <wehe[AT]tuxmobil.org> Linux Mobile Edition Edition Version 3.22 TuxMobil Berlin Copyright © 2000-2011 Werner Heuser 2011-12-12 Revision History Revision 3.22 2011-12-12 Revised by: wh The address of the opensuse-mobile mailing list has been added, a section power management for graphics cards has been added, a short description of Intel's LinuxPowerTop project has been added, all references to Suspend2 have been changed to TuxOnIce, links to OpenSync and Funambol syncronization packages have been added, some notes about SSDs have been added, many URLs have been checked and some minor improvements have been made. Revision 3.21 2005-11-14 Revised by: wh Some more typos have been fixed. Revision 3.20 2005-11-14 Revised by: wh Some typos have been fixed. Revision 3.19 2005-11-14 Revised by: wh A link to keytouch has been added, minor changes have been made. Revision 3.18 2005-10-10 Revised by: wh Some URLs have been updated, spelling has been corrected, minor changes have been made. Revision 3.17.1 2005-09-28 Revised by: sh A technical and a language review have been performed by Sebastian Henschel. Numerous bugs have been fixed and many URLs have been updated. Revision 3.17 2005-08-28 Revised by: wh Some more tools added to external monitor/projector section, link to Zaurus Development with Damn Small Linux added to cross-compile section, some additions about acoustic management for hard disks added, references to X.org added to X11 sections, link to laptop-mode-tools added, some URLs updated, spelling cleaned, minor changes.
    [Show full text]
  • A Zahlensysteme
    A Zahlensysteme Außer dem Dezimalsystem sind das Dual-,dasOktal- und das Hexadezimalsystem gebräuchlich. Ferner spielt das Binär codierte Dezimalsystem (BCD) bei manchen Anwendungen eine Rolle. Bei diesem sind die einzelnen Dezimalstellen für sich dual dargestellt. Die folgende Tabelle enthält die Werte von 0 bis dezimal 255. Be- quemlichkeitshalber sind auch die zugeordneten ASCII-Zeichen aufgeführt. dezimal dual oktal hex BCD ASCII 0 0 0 0 0 nul 11111soh 2102210stx 3113311etx 4 100 4 4 100 eot 5 101 5 5 101 enq 6 110 6 6 110 ack 7 111 7 7 111 bel 8 1000 10 8 1000 bs 9 1001 11 9 1001 ht 10 1010 12 a 1.0 lf 11 101 13 b 1.1 vt 12 1100 14 c 1.10 ff 13 1101 15 d 1.11 cr 14 1110 16 e 1.100 so 15 1111 17 f 1.101 si 16 10000 20 10 1.110 dle 17 10001 21 11 1.111 dc1 18 10010 22 12 1.1000 dc2 19 10011 23 13 1.1001 dc3 20 10100 24 14 10.0 dc4 21 10101 25 15 10.1 nak 22 10110 26 16 10.10 syn 430 A Zahlensysteme 23 10111 27 17 10.11 etb 24 11000 30 18 10.100 can 25 11001 31 19 10.101 em 26 11010 32 1a 10.110 sub 27 11011 33 1b 10.111 esc 28 11100 34 1c 10.1000 fs 29 11101 35 1d 10.1001 gs 30 11110 36 1e 11.0 rs 31 11111 37 1f 11.1 us 32 100000 40 20 11.10 space 33 100001 41 21 11.11 ! 34 100010 42 22 11.100 ” 35 100011 43 23 11.101 # 36 100100 44 24 11.110 $ 37 100101 45 25 11.111 % 38 100110 46 26 11.1000 & 39 100111 47 27 11.1001 ’ 40 101000 50 28 100.0 ( 41 101001 51 29 100.1 ) 42 101010 52 2a 100.10 * 43 101011 53 2b 100.11 + 44 101100 54 2c 100.100 , 45 101101 55 2d 100.101 - 46 101110 56 2e 100.110 .
    [Show full text]
  • Linux User Group HOWTO Linux User Group HOWTO Table of Contents Linux User Group HOWTO
    Linux User Group HOWTO Linux User Group HOWTO Table of Contents Linux User Group HOWTO..............................................................................................................................1 Rick Moen...............................................................................................................................................1 1. Introduction..........................................................................................................................................1 2. What is a GNU/Linux user group?......................................................................................................1 3. What LUGs exist?................................................................................................................................1 4. What does a LUG do?..........................................................................................................................1 5. LUG activities......................................................................................................................................1 6. Practical suggestions............................................................................................................................1 7. Legal and political issues.....................................................................................................................2 8. About this document............................................................................................................................2 1. Introduction..........................................................................................................................................2
    [Show full text]
  • 1.4. Introducción a Unix Y Linux
    APUNTES USC www.apuntesusc.es Administración de Sistemas e Redes Grao en Enxeñaría Informática Grao Escola Técnica Superior de Enxeñaría Universidade de Santiago de Compostela Tomás Fernández Pena [email protected] 5 de septiembre de 2018 APUNTES USC www.apuntesusc.es APUNTES USC www.apuntesusc.es APUNTES USC www.apuntesusc.es APUNTES USC www.apuntesusc.es Índice general 1. Introducción a la administración de sistemas1 1.1. Introducción a la asignatura...................1 1.1.1. La figura del administrador de sistemas.........1 1.1.2. Objetivos de la asignatura................1 1.1.3. ¿Por qué UNIX/GNU Linux?..............2 1.1.4. Información oficial....................2 1.1.5. Relación con otras asignaturas..............3 1.2. Tareas de un administrador de sistemas.............3 1.2.1. Principales tareas.....................5 1.3. Políticas y estándares.......................6 1.3.1. Políticas y procedimientos................7 1.3.2. Estándares y recomendaciones..............9 1.4. Introducción a Unix y Linux................... 12 1.4.1. Historia de Unix..................... 12 1.4.2. Sistemas GNU/Linux................... 15 1.4.3. Distribuciones de GNU/Linux.............. 18 1.5. Virtualización........................... 22 2. Introducción a los sistemas Linux/Unix 26 2.1. Instalación de Linux Debian................... 26 2.1.1. Tipos de instalación................... 26 2.1.2. Instalación del sistema.................. 27 2.1.3. Arranque del sistema................... 44 2.1.4. Verificación de la instalación............... 47 2.2. Instalación de software...................... 51 2.2.1. Formas de instalación................... 51 2.2.2. dpkg............................ 52 2.2.3. APT - Advanced Packaging Tools............ 56 2.2.3.1. Corrección de problemas...........
    [Show full text]
  • Linux-FAQ.Pdf
    The Linux FAQ David C. Merrill david −AT− lupercalia.net 2003−09−19 Revision History Revision 1.20 2001−12−04 Revised by: rk Revision 2.0 2002−04−25 Revised by: dcm Some reorganization and markup changes. Revision 2.1 2003−05−19 Revised by: dcm Fairly complete reorganization and conversion to WikiText. Revision 2.1.1 2003−09−19 Revised by: dcm Minor corrections. Revision 2.1.2 2004−02−28 Revised by: dcm Minor corrections. This is the list of Frequently Asked Questions for Linux, the Free/Open Source UNIX−like operating system kernel that runs on many modern computer systems. The Linux FAQ Table of Contents 1. Introduction.....................................................................................................................................................1 1.1. About the FAQ..................................................................................................................................1 1.2. Asking Questions and Sending Comments.......................................................................................1 1.3. Authorship and Acknowledgments...................................................................................................1 1.4. Copyright and License......................................................................................................................2 1.5. Disclaimer.........................................................................................................................................2 2. General Information.......................................................................................................................................3
    [Show full text]
  • COIT 13146 Systems Administration (An Introduction to Linux Systems Administration) Study Guide Systems Administration Edition 2003
    *100072* *100072* COIT 13146 Systems Administration (An Introduction to Linux Systems Administration) Study Guide Systems Administration Edition 2003 Copyright (Study Guide) Central Queensland University, 2003 Developed by staff of the Faculty of Informatics and Comminication. Produced and printed by the Distance and Flexible Learning Centre Central Queensland University Rockhampton, Queensland Copyright material herin is reproduced under the provision of the Copyright Act 1968. Material copied with the permission of thecopyright holder has been duely identified DEVELOPED BY David Jones, Kieren Jamieson, Damien Clark, Nathaniel Fitzgerald-Hood and Anthony Ferguson Chapter .............................................................................................................................................................................19 The Overview................................................................................................................................................................................19 Introduction...................................................................................................................................................................................19 Other Resources ............................................................................................................................................................................19 The Course ....................................................................................................................................................................................20
    [Show full text]
  • Linux Laptop-HOWTO
    Linux Laptop−HOWTO Linux Laptop−HOWTO Table of Contents Linux Laptop−HOWTO.....................................................................................................................................1 Werner Heuser <[email protected]>....................................................................................................1 1. Preface..................................................................................................................................................1 2. Copyright, Disclaimer and Trademarks...............................................................................................1 3. Which Laptop to Buy?.........................................................................................................................1 4. Laptop Distribution..............................................................................................................................2 5. Installation...........................................................................................................................................2 6. Hardware In Detail...............................................................................................................................2 7. Palmtops, Personal Digital Assistants − PDAs, Handheld PCs − HPCs.............................................2 8. Cellular Phones, Pagers, Calculators, Digital Cameras, Wearable Computing...................................3 9. Accessories..........................................................................................................................................3
    [Show full text]
  • Sponsorship & Exhibitor Prospectus
    PORTLAND 2009 SEPTEMBER 2 1 - 2 3 Sponsorship & Exhibitor Prospectus Gain Valuable Exposure at the Newest Linux Technology Conference Covering All Matters Linux - LinuxCon CONFERENCE OVERVIEW LinuxCon is a new annual technical conference that will provide an unmatched collaboration and education space for all matters Linux. LinuxCon will bring together the best and brightest that the Linux community has to offer, including core developers, administrators, end users, community managers and industry experts. In being the conference for "all matters Linux", LinuxCon will be informative and educational for a wide range of attendees. We will not only bring together all of the best technical talent but the decision makers and industry experts who are involved in the Linux community. LinuxCon Features: Top Notch Speaking Talent & Innovative Content LinuxCon brings you the best and the brightest in speaking talent. In addition to keynotes, roundtable panels and 75 conference sessions in three track types (Developer, Operations and Business), LinuxCon also includes tutorials, lightning talks, training, BoFs, LPI certification and other programming. Wide Variety of Opportunities to Connect Outside of the classroom, we offer a variety of ways to learn and connect with your peers, including evening events, developer lounges, a technology showcase and much more. Added Value of Co-Located Events Adding benefit to your attendance at LinuxCon, you can also choose to take part in one of the other co-located events, including the Linux Plumbers Conference, OpenSUSE Workshop, FOSS DevCamp, LDAPCon and more. For the Community, by the Community LinuxCon is organized by The Linux Foundation, a non-profit consortium working with the community to protect, promote and standardize Linux.
    [Show full text]
  • Journal File Systems LG #55
    Journal File Systems LG #55 http://www.linuxgazette.com/issue55/florido.html "Linux Gazette...making Linux just a little more fun!" Journal File Systems By Juan I. Santos Florido INTRODUCTION As Linux grows up, it aims to satisfy different users and potential situations’ needs. During recent years, we have seen Linux acquire different capabilities and be used in many heterogeneous situations. We have Linux inside micro-controllers, Linux router projects, one floppy Linux distribution, partial 3-D hardware speedup support, multi-head Xfree support, Linux games and a bunch of new window managers as well. Those are important features for end users. There has also been a huge step forward for Linux server needs — mainly as a result of the 2.2.x Linux kernel switch. Furthermore, sometimes as a consequence of industry support and others leveraged by Open Source community efforts, Linux is being provided with the most important commercial UNIX and large server’s features. One of these features is the support of new file systems able to deal with large hard-disk partitions, scale up easily with thousands of files, recover quickly from crash, increase I/O performance, behave well with both small and large files, decrease the internal and external fragmentation and even implement new file system abilities not supported yet by the former ones. This article is the first in a series of two, where the reader will be introduced to the Journal File Systems: JFS, XFS, Ext3, and ReiserFs. Also we will explain different features and concepts related to the new file systems above.
    [Show full text]
  • Linux Installation Guide
    Linux Installation and Getting Started 1992–1998 Matt Welsh Phil Hughes David Bandel Boris Beletsky Sean Dreilinger Robert Kiesling Evan Liebovitch Henry Pierce Version 3.2, 20 February 1998. This book is meant for UNIX novices and gurus alike. It contains information on how to obtain Linux, software installation, a tutorial for new Linux users, and an introduction to system administration. It is meant to be general enough to be appli- cable to any distribution of Linux. You may freely copy and redistribute this book under certain conditions. Please see the copyright and distribution statement. Names of all products herein are used for identification purposes only and are trademarks and/or registered trademarks of their respective owners. Specialized Systems Consultants, Inc., makes no claim of ownership or corporate association with the products or companies that own them. Copyright c 1992-1996 Matt Welsh Copyright c 1998 Specialized Systems Consultants, Inc (SSC) P.O. Box 55549 Seattle, WA 98155-0549 USA Phone: +1-206-782-7733 Fax: +1-206-782-7191 E-mail: [email protected] URL: http://www.ssc.com/ Linux Installation and Getting Started is a free document; you may reproduce and/or modify it under the terms of version 2 (or, at your option, any later version) of the GNU General Public License as published by the Free Software Foundation. This book is distributed in the hope it will be useful, but WITHOUT ANY WARRANTY; with- out even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR- POSE. See the GNU General Public License for more details, in Appendix C.
    [Show full text]
  • User Guide to Using the Linux Desktop
    User Guide to Using the Linux Desktop Nah Soo Hoe and Colin Charles Published by the United Nations Development Programme’s Asia-Pacific Development Information Programme (UNDP-APDIP) Kuala Lumpur, Malaysia Web: http://www.apdip.net/ Email: [email protected] © UNDP-APDIP 2004 The material in this guide may be reproduced, republished and incorporated into further works provided acknowledgment is given to UNDP-APDIP. This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. Preface This user guide is meant as an introductory guide for a user to use a modern personal computer (PC) running the Linux operating system. The main aim is to provide a self-learning guide on how to use a modern Linux desktop system. It assumes that the user has no prior knowledge of Linux or PC usage. After going through the guide the reader should be in a position to start using a Linux desktop for both personal and office use. In particular she should be able to: • access the Internet and use the WWW and Internet email • manipulate and manage files, folders and the file system • produce and print simple documents and presentation materials • advance to become a power user by further self-learning and exploring Linux has many distributions and sometimes the programs or tools used to perform a certain function can vary from distribution to distribution. This guide tries to be as generic as possible in the description of the features and functionalities.
    [Show full text]
  • Vademecum Linux 3.0 Beta
    LINUX VADEMECUM Versione 3.0 beta CHE COSA CI TROVO DENTRO? LE RISPOSTE a COSA VUOI FARE OGGI? ovvero come cambiare sistema operativo DOVE VUOI ANDARE OGGI? ovvero come procurarsi un sistema operativo Linux QUALE VUOI OGGI? ovvero come scegliere una distribuzione Linux COSA VUOI CREARE OGGI? ovvero come scegliere i programmi Linux COME VUOI USARLO OGGI? ovvero come funziona il vostro sistema operativo Linux CHI PUO' AIUTARMI OGGI? ovvero dove trovare aiuto e supporto CHE COSA VUOL DIRE QUESTO OGGI? ovvero un breve glossario con i termini Linux più comuni Licenza: CC Attribuzione - Non commerciale - Condividi allo stesso modo 3.0 Unported Vademecum Linux 3.0 beta COSA VUOI FARE OGGI? ovvero come cambiare sistema operativo olti di voi hanno imparato ad usare un computer in un certo modo, sono abituati a trovare gli strumenti che usate Mquotidianamente sempre allo stesso posto. Ora vi siete decisi. Volete cambiare sistema operativo. Per tanti motivi. Questi possono essere l'esigenza di avere maggiore libertà, maggiore privacy, maggiore sicurezza, maggiore stabilità, maggiore qualità degli applicativi, minor costo. Una buona notizia, Linux si basa su standard, standard che sono alla base del sistema operativo che voi state utilizzando adesso. Alcune parole chiave sono diverse, alcune procedure sono diverse, ma i concetti sottostanti sono uguali. Tenete presente che Linux non è un INFO: Linux, con la funzione multiboot, può sostituto o un clone di altri sistemi convivere nello stesso computer insieme altri sistemi operativi, anche nello stesso disco operativi, ha una sua personalità e rigido, ma in partizioni diverse. caratteristiche specifiche che lo differenziano.
    [Show full text]