Linux Commands
Linux Commands
Online Terminals
1.COCALC : https://cocalc.com/features/linux
$cd /
//Change directory to the root directory
$cd dir-1/dir-2/dir-3
//This command is used to move inside a
directory from directory.
LINUX Commands
• cd : Known as change di rectory command. Change current
working directory.
Synatx:
$cd ~ or $cd
//change directory to the
home directory.
$cd..
//This command is used to move to the parent directory of
current directory or one level up from current
directory.
LINUX Commands
• rmdir: Used to remove empty directories from file system in Linux.
Syntax: rmdir [-ignore –fail – on -non –empty]
directories..
• pwd: It prints the path of working directory, starting from the
root. pwd stands for print working directory.
Syntax: $pwd
• cat: Reads data from file & gives their content as output. It helps us
to create, view & concatenates files.
Syntax: $cat filename // It gives content of file
$cat file1 file2 //It gives contents
of multiple files
$cat > new file //it will create
named new file.
LINUX Commands
• rm: Used to remove objects such as files, directories, symbolic
links and so on.
Syntax: rm [option] filename
• $rm –i d.txt : -i prompts conformation before delete
file. You have to press Y for deletion.
• $rm –f e.txt: -f rm prompts for confirmation removal if
any file is write protected. The –f option override this minor
operation & removes files forcefully.
LINUX Commands
• cp : Used to copy files or group of files or directory.
Syntax: cp [option] source destination
cp [option] source directory
cp [option] source-1 source-2 source-3
source-n Directory
• mv: Used to move one or more files or directories from one
place to another.
Syntax: mv [option] source destination
LINUX Commands
• chmod : Change the access mode of file.
o Others Users who are neither the file’s owner nor member of the file’s group
= The modes specified are to be made the exact modes for the specified classes
LINUX Commands
• ps: Used to list the currently running processes & their PIDs
along with some other information depends on different options.
Synatx: ps [options]
-i Case sensitive
-v Inverting the pattern match. You can display lines that are not matched