Editing
Basic Linux Commands
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== System & User Info === {| class="wikitable sortable" ! Command !! Description !! Usage |- | [[#ex-whoami|<code>whoami</code>]] || Show current user || <code>whoami</code> |- | [[#ex-id|<code>id</code>]] || Display user/group IDs || <code>id [USERNAME]</code> |- | [[#ex-df|<code>df</code>]] || Disk usage overview || <code>df [OPTIONS]</code> |- | [[#ex-du|<code>du</code>]] || Show disk usage for files/directories || <code>du [OPTIONS] [PATH]</code> |- | [[#ex-uptime|<code>uptime</code>]] || Show how long the system has been running || <code>uptime</code> |- | [[#ex-uname|<code>uname</code>]] || System information (kernel, OS, architecture) || <code>uname -a</code> |- | [[#ex-hostname|<code>hostname</code>]] || Show or set system hostname || <code>hostname</code> |- | [[#ex-date|<code>date</code>]] || Display or set system date/time || <code>date</code> |- | [[#ex-cal|<code>cal</code>]] || Display a calendar || <code>cal</code> |- | [[#ex-env|<code>env</code>]] || Show environment variables || <code>env</code> |- | [[#ex-set|<code>set</code>]] || Display shell variables and functions || <code>set</code> |- | [[#ex-history|<code>history</code>]] || List previously executed commands || <code>history</code> |- | [[#ex-ps|<code>ps</code>]] || Display running processes || <code>ps aux</code> |- | [[#ex-top|<code>top</code>]] || Real-time system process monitor || <code>top</code> |- | [[#ex-kill|<code>kill</code>]] || Terminate process by PID || <code>kill [-9] PID</code> |- | [[#ex-pkill|<code>pkill</code>]] || Kill processes by name || <code>pkill PROCESS_NAME</code> |- | [[#ex-pgrep|<code>pgrep</code>]] || Search for processes by name || <code>pgrep PROCESS_NAME</code> |- | [[#ex-w|<code>w</code>]] || Show who is logged in and what they are doing || <code>w</code> |- | [[#ex-who|<code>who</code>]] || Show who is logged in || <code>who</code> |- | [[#ex-last|<code>last</code>]] || Show login history || <code>last</code> |- | [[#ex-free|<code>free</code>]] || Show memory usage || <code>free -h</code> |}
Summary:
Please note that all contributions to HackOps may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
HackOps:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Tools
What links here
Related changes
Special pages
Page information