Linux Terminal - System Information
This page is a part of the Linux and CS Systems - Getting Started. This page assumes you have your computer setup to connect to the CS server, or have the appropriate software installed on your computer to run commands. Go back to the Linux and CS Systems Getting Started main page if you don't have our system setup yet.
The following are some commands to print information about the system.
- uptime - how long since last system reboot
- df - information about disk free space
- whoami - which user is currently logged in on the terminal
- hostname - what computer are you currently running commands on
- pwd - which directory are you inside of
- clear - clear the terminal screen
- finger - see which other users are currently logged in
- man - help about a command (manual). While using man - use q key to quit, and up/down arrows to scroll.
An example quiz over this material. After watching the video and trying the commands out yourself to make sure you understand.
Fill in the blank, what is the linux command to do for each of the following.
- get how long since last system reboot:
- get information about disk free space:
- get which user is currently logged in on the terminal:
- get what computer you are currently running commands on:
- get which directory are you inside of:
- clear the terminal screen:
- see which other users are currently logged in:
- help about a command (manual):
The following might be used by your instructor as part of a HW assignment to verify that you are able to use the these commands to get information about the system.
Create a directory to store files for this HW. If you are given this assignment in one of your courses you will be told which directory to use. We refer to this directory as HW_dir.
- Create a file system-information.txt in your HW_dir
- In the file, fill in the following
- Date when you ran these commands (dd-mm-yyyy, from date):
- Name of the computer you ran the commands on (from hostname):
- How long since last system reboot (from uptime):
- TB used and TB available in /u1 (from df -h):
- Command for getting uptime in how many weeks, days, hours, minutes (use
man uptimeand read the documentation, note that you type q to quite the manual):
The following is a transcript of the commands and screen output from the youtube video linked at the top of this page. Blank lines have been put in after each command. You can read through the transcript and think about what you think the output will be after each command is entered, and check that this is how it shows in the transcript.
Note that the transcript is for the user cs15100 logged in to the CS server.