-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux time Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to time on Linux, covering Arch Linux, CachyOS, and other distributions including command timing, performance measurement, and execution time.
Basic usage:
# Time command execution
time ls
# Shows execution timeTime output:
# Output shows:
# real - wall clock time
# user - CPU time in user mode
# sys - CPU time in kernel modeBasic timing:
# Time command
time ls
# Output:
# real 0m0.001s
# user 0m0.000s
# sys 0m0.001sMeasure duration:
# Time long command
time sleep 5
# Shows ~5 seconds real timeMore details:
# Verbose timing
/usr/bin/time -v ls
# -v = verbose (detailed statistics)Resource info:
# Resource usage
/usr/bin/time -v command
# Shows:
# - Memory usage
# - Page faults
# - Context switches
# etc.Format string:
# Custom format
/usr/bin/time -f "%E real, %U user, %S sys" ls
# -f = format (custom format string)Common formats:
# %E - elapsed time
# %U - user time
# %S - system time
# %M - max memory (KB)Check installation:
# time is built-in shell command
# /usr/bin/time is separate program
# Check both
which time
which /usr/bin/timeThis guide covered time usage, command timing, and performance measurement for Arch Linux, CachyOS, and other distributions.
- Performance Tuning - Performance optimization
- System Monitoring - System monitoring
- htop Guide - Process monitoring
-
time Documentation:
man time
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.