0% found this document useful (0 votes)
29 views2 pages

Linux Commands Cheat Sheet

This document is a cheat sheet for Linux commands and file system hierarchy. It covers remote server connections using SSH, file system directories, and essential commands for managing files and processes. Key commands include ssh-keygen, ls, cp, mv, and top for various operations on a Linux server.

Uploaded by

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

Linux Commands Cheat Sheet

This document is a cheat sheet for Linux commands and file system hierarchy. It covers remote server connections using SSH, file system directories, and essential commands for managing files and processes. Key commands include ssh-keygen, ls, cp, mv, and top for various operations on a Linux server.

Uploaded by

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

Linux Commands Cheat Sheet

We use SSH to connect remotely with our VMs, on cloud.


To connect we use WinSCP and Putty.
2 ways to connect to remote servers using Password, or SSH Keys.
SSH keys contain public key and private key.

ssh-keygen
nano authorized_keys

File system hierarchy standard defines the list of directories in OS.


Forward slash is root file system.

/home
/etc/nginx
/var/log

Linux is case-sensitive.

Extended file systems are used to manage the data storage on a linux file
system.

Partitions are logical volumes of the main disk.

/bin contains commands executables


Binaries are used to run different commands on a linux server.

Boot is directory where all files related to booting an OS is located.


grub is used to troubleshoot any issues with system booting.

etc, is home to configuration files, any software we install the


configuration files in in etc.

mnt, mount any external disks or usb or hard drives.

opt contains any additional software packages.


run directory contains real time process ids of services

cat /run/sshd.pid
and ps -aux | grep ssh will give the process id of ssh.

usr contains unique system resources


var contains the log files and those files that are continually updated.

sudo nano /etc/hosts, use sudo to edit hosts file

ls -la shows hidden files.


ll -tch
shows the most recently updated file on top.

w command shares details of user, system uptime.

last command shows different users working on single vm.


details of users login activity

uptime, last time when server was rebooted.

sudo cp abc.txt /opt/


mv is cut paste, cp is copy paste
sudo rm abc.txt

forecefully remove does not ask for permission, rm -fr abc.txt

top command is used to see the processes running in linux server.


ps shows the processes that are running
ps -aux shows more details of processes that are running

You might also like