[go: up one dir, main page]

0% found this document useful (0 votes)
7 views3 pages

Linux Vi Shell Commands Reference

The document provides a reference for using the Vi editor and basic Linux shell commands. It covers the modes and commands of the Vi editor, various Linux shells, basic file operations, system information commands, networking commands, user management commands, and useful shortcuts. This serves as a quick guide for users to navigate and perform tasks in Unix/Linux environments.

Uploaded by

arpitmahajan856
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

Linux Vi Shell Commands Reference

The document provides a reference for using the Vi editor and basic Linux shell commands. It covers the modes and commands of the Vi editor, various Linux shells, basic file operations, system information commands, networking commands, user management commands, and useful shortcuts. This serves as a quick guide for users to navigate and perform tasks in Unix/Linux environments.

Uploaded by

arpitmahajan856
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Linux Vi Editor and Shell Commands Reference

1. Vi Editor

A terminal-based text editor for Unix/Linux systems.

Modes in Vi:

- Command Mode (Default): Navigation & text manipulation

- Insert Mode (i): Edit/insert text

- Last Line Mode (:): Save, quit, search

Basic Vi Commands:

Command Description Example

vi file Open/create file vi notes.txt

:w Save file :w

:q Quit :q

:wq Save & quit :wq

:q! Quit without saving :q!

dd Delete line Press dd

/text Search for 'text' /hello

2. Linux Shells

A shell is a command-line interpreter.

Shell Description

sh Original Unix shell

bash Default on Linux (Bourne Again Shell)

zsh Extended features, user-friendly

fish Auto-suggestions, modern UI

3. Basic Linux Commands

File Operations:

Command Description Example


Linux Vi Editor and Shell Commands Reference

ls List files ls -l

pwd Show directory pwd

cd Change directory cd /home

mkdir Create directory mkdir folder

rm Delete file rm file.txt

cp Copy file cp file1.txt file2.txt

mv Move/rename file mv old.txt new.txt

System Info:

Command Description Example

whoami Current user whoami

uname -a System info uname -a

df -h Disk space df -h

top Running processes top

uptime System uptime uptime

free -m Memory usage free -m

Networking:

Command Description Example

ping Test connection ping google.com

ifconfig Network config ifconfig

wget Download file wget http://example.com/file

curl Transfer data curl http://example.com

netstat -tuln Show ports netstat -tuln

User Management:

Command Description Example

passwd Change password passwd

useradd Add user useradd newuser

usermod Modify user usermod -aG sudo username

deluser Delete user deluser username


Linux Vi Editor and Shell Commands Reference

id User ID info id

4. Useful Shortcuts

Ctrl+C -> Stop current command

Ctrl+Z -> Pause process

Ctrl+D -> Exit terminal

Ctrl+R -> Search command history

Tab -> Auto-complete

!! -> Repeat last command

!abc -> Run last command starting with 'abc'

You might also like