Home
77 Useful Linux Commands and Utilities
Contents
1. Gawk is the GNU Project s version of the AWK programming language Contents bzip2 IM A portable fast open source program used to compress and decompress 77 Useful Linux files at high rates Commands and Le How to use bzip2 in Linux Utilities More on how to use the bzip2 compression program C cat Unix Linux command that can read modify or concatenate text files most commonly used for displaying contents of files See how to use cat to display contents of a file in Linux An article on what you can do with the cat command cd The cd command changes the current directory in Linux and can toggle between directories conveniently It is similar to the CD and CHDIR commands in MS DOS See more on how to use the cd command to change directories chmod Chmod changes the access mode permissions of one or more files Only the owner of a file or a privileged user may change the mode See examples of changing the permissions of files using chmod chown Chown changes file or group ownership and has options to change ownership of all objects within a directory tree and view information on objects processed Learn how to change file ownership with chown Page 2 of 16 cmp The cmp utility compares two files of any type and writes the results to the standard output By default cmp is silent if the files are the same if they Contents differ the byte and line number at which the first difference occurred i
2. TechTarget An essential guide for Linux administrators Contents 77 Useful Linux Commands and Utilities Page 1 of 16 Linux administrators cannot live by the GUI alone That s why we ve compiled the most essential Linux commands into this convenient interactive guide We designed this guide specifically for Linux managers and system administrators as a reference library of only the most useful utilities By learning a few simple tools command line cowards can turn into scripting commandos getting the most out of Linux by executing kernel and shell commands A alias A way to run a command or a series of Unix commands using a shorter name you get associated with such commands How to use the alias command in Linux apt get Apt get is a tool to automatically update a Debian machine and get and install Debian packages programs How to manage software on Ubuntu Server with aptitude and apt get Understanding the Debian archives and apt get Using apt get to update your Debian Machine Aspell GNU Aspell is a free and open source spell checker designed to replace Ispell It can either be used as a library or as an independent spell checker How to use Aspell to check spelling AWK Gawk A programming language tool used to manipulate text The language of the AWK utility resembles the shell programming language in many areas although AWK s syntax is very much its own Learn how to use the AWK utility
3. and writes file names matching patterns to output Finding files directories efficiently with locate Like locate slocate or secure locate provides a way to index and quickly search for files but also securely stores file permissions and ownership so unauthorized users will be unable to view such files See an example of using slocate as a quick secure way to index files Ift Lft is similar to traceroute in determining connection routes but gives a lot more information for debugging connections or finding where a box system is It displays route packets and file types More on displaying route packets with Ift Page 7 of 16 In The In command creates new names for a file by hard linking letting multiple users share one file Contents Examples of hard linking files with In A few more examples of using In 77 Useful Linux Commands and pee Is Utilities The Is command lists files and directories within the current working directory and admins can determine when configuration files were last edited The Is command is also discussed in this tip Examples of listing files and directories with Is M man Short for manual man allows a user to format and display the user manual built into Linux distributions which documents commands and other aspects of the system The man command is also discussed in this tip See how to use the man command See examples of formatting man pages mc A visual shell text
4. based file manager for Unix systems An extensive guide to managing files with mc more See less N neat Neat is a GNOME GUI admin tool which allows admins to specify information needed to set up a network card among other features Setting up an NTL Cable Modem using neat Page 8 of 16 Contents 77 Useful Linux Commands and Utilities Page 9 of 16 Where neat falls in when building a network between Unix and Linux systems netconfig netcfg Netconfig configures a network enables network products and displays a series of screens that ask for configuration information Configuring networks using Red Hat netcfg netstat Netstat provides information and statistics about protocols in use and current TCP IP network connections A helpful forensic tool in figuring out which processes and programs are active on a computer and involved in networked communications More on checking network statuses with the netstat command nslookup Nslookup allows a user to enter a host name and find the corresponding IP address A reverse of the process to find the host name is also possible More from Microsoft on how to find IP addresses with nslookup O od Od is used to dump binary files in octal or hex binary format to standard output Examples of dumping files with od More on od from IBM P passwd Passwd updates a user s authentication tokens changes the current password Some IBM examples on changing pass
5. duces a count for multiple files if several files are selected More from IBM on displaying word counts with wc wget Wget is a network utility that retrieves files from the Web supporting http https and ftp protocols It works non interactively in the background while a user is logged off Can create local versions of remote websites re creating directories of original sites Examples of creating mirror images of sites with wget while See for whoami Whoami prints or writes the user login name associated with the current user ID to the standard output Examples from IBM of determining which login name is used with whoami X xargs Xargs reads builds and executes arguments from standard input Blank lines in the input are ignored Examples from IBM of running commands from input with xargs Page 14 of 16 TechTarget Contents Free resources for technology professionals RE TechTarget publishes targeted mechinalegy media that ans your need for Commande and information and resources for researching products developing strategy and Utilities making cost effective purchase decisions Our network of technology specific Web sites gives you access to industry experts independent content and analysis and the Web s largest library of vendor provided white papers webcasts podcasts videos virtual trade shows research reports and more drawing on the rich R amp D resources of technology providers to address market tr
6. earching with grep gzip Gzip is the GNU project s open source program used for file compression compressing web pages on the server end for decompression in the browser Popular for streaming media compression and can concatenate and compress several streams simultaneously Examples of using qzip for compressing files ifconfig config is used to configure the kernel resident network interfaces It is used at boot time to set up interfaces After that it is usually only needed when debugging or when system tuning is needed Examples of using iconfig to configure a network Using ifconfig to detect Linux network configuration problems Page 6 of 16 ifup up configures a network interface enables a network connection More on the ifup command in configuring network interfaces Contents ifdown Ifdown shuts down a network interface disables a network connection 77 Useful Linux More on shutting down networks with ifdown Commands and Utilities L less more The less command lets an admin scroll through configuration and error log files displaying text files one screen at a time with backward or forward moving available in files More mobility within files than in more View several different file types with less Similar to less more pages through text one screen at a time but is more limited in moving in files See a few examples of displaying files with more locate slocate Locate reads one or more databases
7. ends challenges and solutions Our live events and virtual seminars give you access to vendor neutral expert commentary and advice on the issues and challenges you face daily Our social community IT Knowledge Exchange allows you to share real world information in real time with peers and experts What makes TechTarget unique TechTarget is squarely focused on the enterprise IT space Our team of editors and network of industry experts provide the richest most relevant content to IT professionals and management We leverage the immediacy of the Web the networking and face to face opportunities of events and virtual events and the ability to interact with peers all to create compelling and actionable information for enterprise IT professionals across all industries and markets Related TechTarget Websites gt SearchEnterpriseLinux gt SearchDataCenter Page 15 of 16
8. es exit The exit command terminates a script and can return a value to the parent script More on terminating scripts with exit expect Expect talks to other interactive programs according to a script and waits for a response often from any string that matches a given pattern Using expect for responses export Export converts files into another format than the one it is currently in Once a file is exported it can be accessed by any application that uses the format Examples of exporting data from a database with export F find Find searches the directory tree to find particular groups of files that meet specified conditions including name and type exec and size and mtime and user Efficiently locating files with find Page 5 of 16 for while For and while are used to execute or loop items repeatedly as long as conditions are met Contents More on looping items with the for command More on looping items with the while command 77 Useful Linux Commands and acre free Utilities a Free displays the total amount of free and used physical memory and swap space in the system as well as the buffers and cache used by the kernel Learn how to use the free command to optimize a computer s memory G gawk See AWK grep Grep searches file s for a given character string or pattern and can replace the string with another one One method of searching for files within Linux Examples of s
9. rom IBM of translating characters with tr traceroute Traceroute determines and records a route through the Internet between two computers and is useful for troubleshooting network router issues If the domain does not work or is not available an IP can be tracerouted A tutorial on using traceroute to determine network issues U uname Uname displays the name current operating system and can print information about the mentioned system Examples of viewing information on the current operating system with uname uniq Unig compares adjacent lines in a file and removes reports any duplicated lines Removing duplicate lines with the unig command A tip from IBM on removing redundant lines with uniq V vi Vi is a text editor that allows a user to control the system by solely using the keyboard instead of a combination of mouse selections and keystrokes An entire guide to using vi to easily control a system with the keyboard vmstat Vmstat is used to get a snapshot of everything in a system reporting information on such items as processes memory paging and cpu activity A Contents good method for admins in determining where issues slowdown in a system may be occurring 77 Useful Linux How to keep an eye on Linux performance with vmstat and others Commands and aed Examples of viewing system memory usage with vmstat Utilities W WC wc counts the number of words lines and characters of text files and pro
10. rt Contents sort IM Used to sort lines of text alphabetically or numerically according to fields 77 Useful Linux supports multiple sort keys Commands and aed Examples of sorting through lines of text with the sort command Utilities More examples of sort with multiple sort keys sudo Sudo allows a system admin to give certain users the ability to run some or all commands at the root level and logs all commands and arguments A tutorial on giving permissions to users with the sudo command SSH SSH is a command interface used for securely gaining access to a remote computer and is used by network admins to control servers remotely A comprehensive tutorial on secure access to remote computers with SSH T tar The tar program provides the ability to create archives from a number of specified files or extract files from such an archive Examples of creating archives with tar TOP TOP is a set of protocols for networks that perform distributed information processing in offices and it displays the tasks on the system that take up the most memory TOP can sort tasks by CPU usage memory usage and runtime Monitoring system processes with TOP Page 12 of 16 Contents 77 Useful Linux Commands and Utilities Page 13 of 16 tr Used to translate or delete characters from a text stream writing to standard output but does not accept file names as arguments only inputs from standard input Examples f
11. s reported 77 Useful Linux See IBM s examples for using cmp Commands and Utilities comm Comm compares lines common to the sorted files file1 and file2 Output is in three columns from left to right lines unique to file1 lines unique to file2 and lines common to both files More on comparing lines with comm Read a brief tutorial on using comm cp The cp command copies files and directories and copies can be made simultaneously to another directory if the copy is under a different name Find out how to copy Linux files and directories with the co command cpio Cpio copies files into or out of a cpio or tar archive which is a file that contains other files plus information about them such as their file name owner timestamps and access permissions The archive can be another file on the disk a magnetic tape or a pipe Cpio has three operating modes and is a more efficient alternative to tar Learn how to use cpio when moving files in a Unix to Linux port See how to back up files with cpio CRON CRON is a Linux system process that will execute a program at a preset time To use CRON a user must prepare a text file that describes the program to be executed and the times that CRON should execute them Then the crontab program is used to load the text file that describes the CRON jobs into CRON Using CRON to execute programs at specific times Page 3 of 16 D date Contents Date sets a system s date and
12. se a single terminal window to run multiple terminal applications or windows 77 Useful Linux A tutorial on running multiple windows and other uses of screen Commands and ne A tip on the uses of screen Utilities crans sdiff Sdiff finds differences between two files by producing a side by side listing indicating lines that are different It then merges the files and outputs results to outiile Example of contrasting files with sdiff More examples from IBM on the sdiff command sed Sed is a stream editor that is used to filter text in a pipeline distinguishing it from other editors Sed takes text input and performs operation s on it and outputs the modified text Typically used for extracting part of a file using pattern matching or substituting multiple occurrences of a string within a file More on extracting and replacing parts of a file with sed Several more examples from IBM on using sed for filtering shutdown Shutdown is a command that turns off the computer and can be combined with variables such as h for halt after shutdown or r for reboot after shutdown Shut down or halt a computer with shutdown slocate See locate Snort Snort is an open source network intrusion detection system and packet sniffer that monitors network traffic looking at each packet to detect dangerous payloads or suspicious anomalies Based on libpcap Page 11 of 16 Stopping hackers with Snort More from Red Hat on using Sno
13. time Also a useful way to output print current information when working in a script file 77 Useful Linux A few more examples from IBM on setting date and time with date Commands and Utilities declare Declare declares variables gives them attributes or modifies properties of variables Examples of declaring variables with declare df Df displays the amount of disk space available on the file system containing each file name argument With no file name available space on all currently mounted file systems is shown More on using df to display the amount of disk space available E echo Echo allows a user to repeat or echo a string variable to standard output More on using the Echo command with shell scripts enable Enable will stop or start printers or classes Examples of how to enable LP printers env Env runs a program in a modified environment or displays the current environment and its variables Examples of changing environment variables using env Page 4 of 16 eval Eval evaluates several arguments and concatenates them into a single command and then reports on that argument s status Contents More on concatenating arguments with eval 77 Useful Linux exec Commands and Exec replaces the parent process by whatever command is typed This command treats its arguments as the specification of one or more sub processes to execute More examples of replacing parent processes with exec Utiliti
14. words with passwd ping Ping allows a user to verify that a particular IP address exists and can accept requests Can be used to test connectivity and determine response time and Contents ensure that a host computer the user is trying to reach is actually operating Examples from IBM of using ping to verify IP addresses 77 Useful Linux Commands and S Utilities ps Ps reports statuses of current processes in a system Some examples of using the ps command pwd The pwd print working directory command displays the name of the current working directory A basic Linux command Learn the differences between PATH and pwd Using pwd to print the current working directory R read Read is used to read lines of text from standard input and assign values of each field in the input line to shell variables for further processing Examples from IBM on using read RPM Red Hat Package Manager RPM is a command line driven program capable of installing uninstalling and managing software packages in Linux A white paper on using RPM The Differences of yum and RPM Examples of installing packages with RPM rsync Rsync synchs data from one disk or file to another across a network connection Similar to rcp but has more options A tip on backing up data with rsync How to use rsync to back up a directory in Linux Page 10 of 16 screen Contents The GNU screen utility is a terminal multiplexor in which a user can u
Download Pdf Manuals
Related Search
Related Contents
給湯暖房用熱源機 取扱説明書 Heath LNB-4 UM Manual - Micron Radio Control VERSION 2.1 USER MANUAL Crucial 16GB DDR4-2133 MULTIPROG Programming Manual OPC8000 series - ads-tec User Manual-SRN-470D,1670D-FRENCH.indb Toshiba SD-44HKSE Home Theater System User Manual Freeloader Instr Multi Language 2.indd 1 - B&H Photo Video Copyright © All rights reserved.
Failed to retrieve file