top of page
Sphere on Spiral Stairs

Linux Utilities and Basic Commands

Writer's picture: BLACK DEVILBLACK DEVIL

The following is a list of commonly used commands organized under different categories for understanding and ease of use. Keys proceeded by a ^character are CONTROL critical combinations.


TERMINAL CONTROL CHARACTERS :

^h: backspace erase previously typed character

^u: erase the entire line of input so far typed

^d: end-of-input for programs reading from the terminal

^s: stop printing on terminal

^q: continues printing on terminal

^z: currently running job; restart with BG or FG

DEL, ^c: kill the currently running program and allow clean-up before exiting

^ \ emergency kill of presently running program with no chance of cleanup


LOGIN AND AUTHENTICATION :

Login access the computer; start the interactive session

Logout disconnect terminal session

Passwd change local login password; you MUST set a non-trivial password information


  • date: show date and time

  • history: list of previously executed commands

  • pine: send or receive mail messages

  • msgs: display system messages

  • man: show on-line documentation by program name

  • info: on-line documentation for GNU programs

  • w, who: who is on the system, and what are they doing

  • who I am: who is logged onto this terminal

  • top: show system status and top CPU using processes

  • uptime: show one-line summary of the system status

  • finger: find out info about a user @system

FILE MANAGEMENT

  • cat: combine file

  • cp: copy files

  • ls: list the file in a directory and their attributes

  • mv: change file name or directory location

  • rm: remove files

  • ln: create another link (name) to a file

  • chomd: set file permissions

  • des: encrypt a data file with a private key

  • find: find files that match specified criteria

DISPLAY CONTENTS OF FILES

  • cat: copy file to display device

  • vi: screen editor for modifying text files

  • more: show text file on a display terminal with paging control

  • head: show the first few lines of a file(s)

  • tail: show the last few lines of a file; or reverse line order

  • grep: display lines that match a pattern

  • lpr: send the file to a line printer

  • pr: format file with page headers, multiple columns, etc.

  • diff: compare two files and report if different.

  • cmp: compare two binary files and report if different.

  • od: display binary file as equivalent octal/hex codes.

  • file: examine file(s) and tell you whether text, data, etc.

  • we: count characters, words, and lines in a file.

DIRECTORIES

  • cd: change to the new directory

  • mkdir: create a new directory

  • rmdir: remove empty directory(remove files first)

  • mv: change the name of the directory

  • pwd: show current directory

DEVICES

  • df: summarize free space on the disk device

  • du: show disk space used by files or directories

SPECIAL CHARACTER HANDLING FOR C-SHELL

  • *: match any characters in a file name

  • -user: shorthand for the home directory of "user"

  • $name: substitute value of variable "name"

  • \: turn off the special meaning of the character that follows

  • ': in pairs, quote string with special chars, except!

  • ": in pairs, quote string with special chars, except! $

  • `: in pairs, substitute output from the enclosed command

CONTROLLING PROGRAM EXECUTION FOR C-SHELL

  • &: run job in the background

  • DEL,^C: kill a job in foreground

  • ^z: suspend job in foreground

  • fg: restart suspended job in foreground

  • bg: restart suspended job in background

  • ;: delimit commands on same line

  • (): group commands on same line

  • !: re-run earlier command from history list

  • ps: print process status

  • kill: kill background job or previous process

  • nice: run program at a lower priority

  • at: run program at a later time

  • crontab: run the program at specified intervals

  • limit: see or set resource limits for programs

  • alias: create an alias name for the program

  • sh,csh: execute a command file


This is a list of commonly used commands organized under different categories for understanding and ease of use. Keys proceeded by a ^ character are CONTROL critical combinations.


In the next blog, we gonna learn about the description of all these commands so make sure to follow me on my Instagram, and pls make sure to sign-up to get the notification if you like this blog, so give life to the blog thanks


Sparsh Sharma

(Black Devil Team)


32 views1 comment

1 Comment


BLACK DEVIL
BLACK DEVIL
Dec 28, 2022

hello everyone pls make sure to like and share this post with your friends and family

thank you , have a nice day


Like
bottom of page