Solaris

Solaris Cheatsheet #

Solaris is a Unix operating system originally developed by Sun Microsystems. It is known for its scalability, especially on SPARC systems, and for its innovative features such as DTrace, ZFS, and Zones. Below is a comprehensive cheatsheet to help you get started with Solaris, covering various commands and their descriptions.

System Information and Management #

CommandDescription
uname -aDisplay all system information
prtdiagDisplay system diagnostic information
dmesgShow system boot messages
prstatDisplay real-time system information
ps -efList all running processes
pkginfoList installed packages
pkgadd -d <package>Install a package
pkgrm <package>Remove a package
pfexec <command>Run a command with elevated privileges

User and Group Management #

CommandDescription
useradd <username>Add a new user
userdel <username>Delete a user
usermod -G <group> <username>Add a user to a group
groupadd <group>Create a new group
groupdel <group>Delete a group
passwd <username>Change a user’s password

Network Management #

CommandDescription
ifconfig -aDisplay all network interfaces
ping <hostname/IP>Send ICMP ECHO_REQUEST to network hosts
netstat -rDisplay the routing table
route add <destination> <gateway>Add a static route
svcadm restart network/physicalRestart network services
ipadmManage IP interfaces and addresses
dladmManage datalink interfaces

Disk Management #

CommandDescription
df -hDisplay disk usage in a human-readable format
du -sh <directory>Show disk usage of a directory
mountDisplay all mounted filesystems
mount -F <fstype> <device> <mount_point>Mount a filesystem
umount <mount_point>Unmount a filesystem
formatFormat and partition a disk
zpool create <pool> <device>Create a ZFS storage pool

System Services and Daemons #

CommandDescription
svcadm enable <service>Enable a service
svcadm disable <service>Disable a service
svcadm restart <service>Restart a service
svcs -aList all services
svcs -xList failed services
svcs -l <service>Display detailed information about a service

File Operations #

CommandDescription
cp <source> <destination>Copy files or directories
mv <source> <destination>Move or rename files or directories
rm <file>Delete a file
rm -r <directory>Delete a directory and its contents
chmod <permissions> <file>Change file permissions
chown <owner>:<group> <file>Change file owner and group
ln -s <target> <link>Create a symbolic link

Solaris

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.