Kartier Pohs

Thursday, December 3, 2015

Linux basic commands

File Handling commands

Linux basic commands

mkdir – make directories
Usage: mkdir [OPTION] DIRECTORY...

ls – list directory contents
Usage: ls [OPTION]... [FILE]...

cd – changes directories
Usage: cd [DIRECTORY]

pwd printname of current working directory
Usage: pwd

vim – Vi Improved, a programmers text editor
Usage: vim [OPTION] [file]...

cp – copy files and directories

mv – move (rename) files

rm remove files or directories
Usage: rm [OPTION]... FILE...

find – search for files in a directory hierarchy
Usage: find [OPTION] [path] [pattern]

history – prints recently used commands
Usage: history

Text Processing

grep print lines matching a pattern
Usage: grep [OPTION] PATTERN [FILE]...

wc print the number of newlines, words, and bytes in files
Usage: wc [OPTION]... [FILE]...

sort – sort lines of text files
Usage: sort [OPTION]... [FILE]...

System Administration

chmod – change file access permissions
Usage: chmod [OPTION] [MODE] [FILE]

chown – change file owner and group
Usage: chown [OPTION]... OWNER[:[GROUP]] FILE...

su – change user ID or become superuser
Usage: su [OPTION] [LOGIN]

passwd – update a user’s authentication tokens(s)
Usage: passwd [OPTION]

who – show who is logged on
Usage: who [OPTION]

ps – report a snapshot of the current processes
Usage: ps [OPTION]

kill – to kill a process(using signal mechanism)
Usage: kill [OPTION] pid

Process Management

tar – to archive a file

zip – package and compress (archive) files

unzip – list, test and extract compressed files in a ZIP archive
Usage: unzip filename

bg – make a foreground process to run in background
Usage: type 'ctrl+z' and then 'bg <job id>'

fg – to make background process as foreground process
Usage: fg [jobid]

jobs – displays the names and ids of background jobs
Usage: jobs


ssh – SSH client (remote login program)
Usage: ssh [options] [user]@hostname

scp – secure copy (remote file copy program)
Usage: scp [options] [[user]@host1:file1] [[user]@host2:file2]

File Systems
fdisk – partition manipulator
eg. sudo fdisk l

mount – mount a file system
Usage: mount t type device dir

umount – unmount file systems
Usage: umount [OPTIONS] dir | device...

du – estimate file space usage
Usage: du [OPTION]... [FILE]...

df – report filesystem disk space usage
Usage: df [OPTION]... [FILE]...

quota – display disk usage and limits
Usage: quota [OPTION]

Advanced Commands
reboot – reboot the system
Usage: reboot [OPTION]

poweroff – power off the system
Usage: poweroff [OPTION]

Editor commands

kate – KDE Advanced Text Editor
Usage: kate [options][file(s)]

vim – Vi Improved, a programmers text editor
Usage: vim [OPTION] [file]...

A text Editor used to create and edit files.
sage: gedit [OPTION] [FILE]...

No comments:

Post a Comment

Copyright 2015 @ Yogesh Prasad