Breaking News

Do you know what is Linux?

Linux

Linux is a name that broadly denotes a family of free and open-source software operating systems built around the Linux kernel. Typically, Linux is packaged in a form known as a Linux distribution for both desktop and server use. Linux works on command line interface (CLI) i.e. most of the work done in Linux is done by typing some set commands on the terminal. Here are a few of those commands which will help you to begin on Linux.

Terminal Control Characters
^h                  backspace erase previously typed characters
^u                  erase entire line of input so far typed
^d                  end-of-input for programs reading from terminal
^s                  stop printing on terminal
^q                  continues printing on terminal
^z                  currently running job; restart with bg or fg
DEL, ^c         kill currently running program and allow clean-up before exiting
^\                   emergency kill of currently running program with no chance of clean-up

Login and Authentication
login             access computer; start 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 am i        who is logged onto this terminal
top                 show system status and top CPU-using processes
uptime           show one line summary of system status
finger             find out info about a user@system

File Management
cat                 combine files
cp                  copy files
ls                   list files in a directory and their attributes
mv                 change file name or directory location
rm                  remove files
ln                   create another link (name) to a file
chmod           set file permissions
des                encrypt a data file with a private key
find                find files that match specified criteria
locate            finds all the files on the file system, starting at the root, that contain all or any part of the search criteria

Display Contents of Files
cat                 copy files to display device
vi                   screen editor for modifying text files
more              show text file on display terminal with paging control
head              show first few lines of a file(s)
tail                  show last few lines of a file; or reverse line order
grep               display lines that match a pattern
lrp                  send files to line printer
pr                   format files with page headers, multiple columns etc.
diff                 compare two files and show differences
cmp               compare two binary files and report it differently
od                  display binary file as equivalent octal/hex codes
file                 examine file(s) and tell you whether text, data, etc.
wc                 count characters, words, and lines in a file

Directories
cd                  change to new directory
mkdir             create new directory
rmdir              remove empty directory (remove files first)
mv                  change name of directory
pwd                show current directory

Devices
df                   summarize free space on disk device
du                  show disk space used by files or directories

Special Character Handling for C-shell
*                  match any character in a file name
~user          shorthand for home directory of “user”
$name        substitute value of variables “name”
\                  turn off special meaning of character that follows
‘                  In pairs, quote string with special chars, except !
“                  In pairs, quote string with special chars, except !, $
`                  In pair, substitute output from enclosed command

Controlling Program Execution for C-shell
&                run job in background
DEL, ^c      kill job in foreground
^z               suspend job in foreground
fg                restart suspended job in foreground
bg               run suspended job in background
;                  delimit commands on same line
()                 group commands on same line
!                  re-run earlier commands from history list
ps                print process status
kill               kill background job or previous process
nice            run program at lower priority
at                run program at later time
crontab       run program at specified intervals
limit             see or set resource limit for programs
alias            create alias name for program (in .login)
sh, csh        execute command file



No comments