Tutorials

Learn More

Below are some basic Linux commands useful while working in Linux based environment in VLSI.

Command

Description

Example

pwd

Print working directory

pwd

ls

List files and directories

ls

cd

Change directory

cd directory_name

mkdir

Make directory

mkdir new_directory

rmdir

Remove directory

rmdir empty_directory

cp

Copy files or directories

cp file.txt /path/to/destination

mv

Move files or directories

mv file.txt /path/to/destination

rm

Remove files or directories

rm file.txt

touch

Create an empty file

touch new_file.txt

cat

Display or concatenate files

cat file.txt

man

Display the manual for a command

man ls

chmod

Change file permissions

chmod 755 file.txt

chown

Change file owner and group

chown user:group file.txt

kill

Terminate a process

kill process_id

top

Display system activity in real-time

top

df

Display disk space usage

df -h

du

Display file and directory space usage

du -h

head

Display the beginning of a file

head file.txt

tail

Display the end of a file

tail file.txt

grep

Search for a pattern in files

grep pattern file.txt

find

Search for files and directories

find /path -name “*.txt”

tar

Create or extract tar archives

tar -cvf archive.tar /path/to/directory

zip

Create or extract zip archives

zip archive.zip file.txt

unzip

Extract files from a zip archive

unzip archive.zip

ssh

Connect to a remote server

ssh username@hostname

whoami

Display the current username

whoami

sudo

Execute a command with superuser privileges

sudo command

su

Switch user or become superuser

su username

passwd

Change user password

passwd

echo

Display a message or output to a file

echo “Hello, Linux!” > greeting.txt

history

Display command history

history

wc

Count lines, words, and characters in a file

wc file.txt

sed

Stream editor for text manipulation

sed ‘s/old/new/g’ file.txt