February 22nd, 2007

Part 2: Helpful Command-Line Commands (Linux)

By Kyle Reasons
Contributing Writer, RealTechNews

General

  • at
  • Runs a command or script at a given time
  • atq
    • Shows the jobs that are scheduled to run
  • atrm
    • Used to remove a job that is scheduled to run
  • batch
    • Runs a command or script and is really a subset of the at command that takes you to the at>prompt if you type only batch
  • cat
    • Displays the contents of a file to the screen
  • cd
    • Changes to another directory
  • chgrp
    • Changes the group associated with one or more files to a different group
  • chmod
    • Controls file security
  • chown
    • Changes file ownership
  • chsh
    • Sets your login shell
  • cmp
    • Used to compare two files
  • cp
    • Copies a file to another directory (and you can rename the file at the same time)

    • df
    • Shows a report of how the disk space is used
  • dump
    • Backs up files
  • edquota
    • Used to edit disk quotas associated with user accounts
  • fdisk
    • Formats and partitions a disk
  • file
    • Displays the file type
  • find
    • Used to find specific files
  • fsck
    • Performs a verification of the file system
  • grep
    • Searches for a particular string of characters in a file
  • groupadd
    • Creates a new group
  • groupdel
    • Deletes an existing group
  • groupmod
    • Modifies an existing group
  • info
    • Displays information and documentation about a command or a utility
  • kbconfig
    • Used to configure a keyboard
  • kbdrate
    • Sets the repeat rate for the keyboard
  • kill
    • Stops a process
  • less
    • Shows the contents of a file, with the ability to go back or more ahead in the file
  • ln
    • Creates symbolic file links
  • lpd
    • Configures a printer
  • lpq
    • Used to check a print queue
  • lpr
    • Prints a file
  • lprm
    • Removes print jobs from the queue
  • ls
    • Lists the contents of a directory
  • man
    • Displays documentation in Linux
  • mkdir
    • Creates a directory
  • more
    • Displays text in a file one screen at a time
  • mount
    • Lists the disks currently mounted; also mounts file systems and devices
  • mv
    • Moves a file to a different directory
  • newfs
    • Creates a new file system
  • passwd
    • Used to change a password
  • pr
    • Used to format a file into pages or columns for printing
  • printenv
    • Prints environment variables that are already set up
  • ps
    • Shows currently running processes
  • pwck
    • Checks the /etc/ passwd and /etc/shadow files to make sure password authentication entries are valid
  • pwd
    • Shows the directory you are in
  • quota
    • Displays the disk quota for users
  • quotacheck
    • Verifies the disk quota files, including reporting disk usage
  • quotaon/quotaoff
    • Enables or disables disk quotas
  • repquota
    • Makes a report of disk quotas
  • restore
    • Restores files (from a dump)
  • rm
    • Removes a file or directory
  • rmdir
    • Deletes a directory that is empty
  • sort
    • Sorts the contents of a text file
  • swapon/swapoff
    • Turns page file devices on or off
  • sync
    • Forces information in memory to be written to disk
  • tar
    • Used to archive files
  • top
    • Shows a report of the main, current processes engaging the central processing unit (CPU)
  • touch
    • Creates an empty file
  • umount
    • Dismounts a file system
  • uname
    • Shows information about the operating system
  • useradd
    • Configures a new user account
  • userdel
    • Removes an existing user account
  • usermod
    • Modifies an existing user account
  • vmstat
    • Displays a report about virtual memory use
  • whereis
    • Used to locate information about a specific file, such as a program

    Network Commands

    • finger
    • Provides information about a user
  • ftp
    • Enables file transfers
  • ifconfig
    • Used to set up a network interface
  • ipchains
    • Used to manage a firewall
  • netstat
    • Shows network connection information
  • nfsstat
    • Shows statistics for Network File System (NFS) file upload and download activity
  • nslookup
    • Used to query information on Internet Domain Name System (DNS) servers
  • ping
    • Used to poll a TCP/IP node to verify you can communicate with it
  • route
    • Displays routing table information and can be used to configure routing
  • showmount
    • Shows clients that have mounted volumes on a NFS server
  • who
    • Shows who is logged on
  • wvdial
    • Controls a Point-to-Point Protocol (PPP)-based modem dialer
    Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
    • del.icio.us
    • digg
    • Fark
    • NewsVine
    • Reddit
    • YahooMyWeb
    You can leave a comment, or trackback from your own site. RSS 2.0

    One comment to "Part 2: Helpful Command-Line Commands (Linux)"

    1. Ed3 says:

      It should be noted those are not Linux-only commands. Most will work on any UNIX-based system, including Mac OSX…

      …or does that ruin your plan for Part3 - Mac OSX command-line commands?

      February 23rd, 2007 at 8:07 am

    Leave a comment