Linux

Linux is a Unix-like and mostly POSIX-compliant computer operating system (OS) assembled under the model of free and open-source software development and distribution.

https://i0.wp.com/news.filehippo.com/wp-content/uploads/2013/06/Linux_Wallpaper_1_by_technokoopa1-1024x640.png

1. File Operations

Filesystem Hierarchy Standard 1

2. User Environments

Users, Groups and Permissions

# list all users
cat /etc/passwd

# add user
useradd user_name

# change passwd
passwd user_name

3. Network Operations

# restart
/etc/init.d/network restart
# stop
/etc/init.d/network stop

Firewall

# ubuntu
sudo ufw disable
sudo ufw enable

4. Process

4.1. List Process

# list process
ps -aux

# kill process
pkill firefox

4.2. Screen

# create new screen
screen -S <screen_name>

# list screen
screen -ls

# exit from screen
Ctrl-a d

5. System Information

OS

> uname -r
2.6.32-504.3.3.el6.x86_64

> cat /etc/redhat-release
CentOS release 7 (Final)

RAM

> free -g

             total       used       free     shared    buffers     cached
Mem:         64394       1407      62987          4         49        359
-/+ buffers/cache:        997      63397
Swap:       102399          0     102399

CPU

> lscpu

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                12
On-line CPU(s) list:   0-11
Thread(s) per core:    2
Core(s) per socket:    6
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 62
Stepping:              4
CPU MHz:               1200.000
BogoMIPS:              5199.93
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              15360K
NUMA node0 CPU(s):     0-11

Hardisk

> df -h

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       197G  143G   44G  77% /
tmpfs            32G   80K   32G   1% /dev/shm
/dev/sda3       2.4T   17G  2.3T   1% /grid/0
/dev/sdb1       2.7T   66G  2.5T   3% /grid/1
/dev/sdc1       2.7T   68G  2.5T   3% /grid/2
/dev/sdd1       2.7T   66G  2.5T   3% /grid/3

similar: fdisk, sfdisk, cfdisk, parted, df, pydf, lsblk, blkid, hwinfo 2

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s