Difference between revisions of "Linux Terminal - System Information"
(→Sample Session) |
(→Commands) |
||
Line 9: | Line 9: | ||
* pwd - which directory are you inside of | * pwd - which directory are you inside of | ||
* clear - clear the terminal screen | * clear - clear the terminal screen | ||
+ | * finger - see which other users are currently logged in | ||
=Sample Session= | =Sample Session= |
Revision as of 18:34, 13 August 2019
This page is a part of the Linux and CS Systems Bootcamp. 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 Bootcamp main page if you don't have our system setup yet.
Commands
The following are some commands to print information about the system.
- uptime - how long since last system reboot
- df - information about disk free space
- whomi - 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
Sample Session
Here is an example session from running on the CS server using all of these commands. Note that the part "cs299@cs:~> " is a prompt that is printed by the terminal, and the part after this is what was typed by the user. So for the first command, the user typed the command uptime and then pressed enter. The system then printed some information on the next line, and then printed the prompt "cs299@cs:~> " again to indicate it is ready for the next command. The prompt displays "cs299" because that is the user that was logged in running these commands. If your username was "cs15115" then your prompt would be something like "cs15115@cs:~>".
You should login to one of the CS systems, open up the terminal, and try out these commands as well. If you get an error, check that you are typing the commands exactly as they are given here.
[video demo]
cs299@cs:~> uptime 09:00:45 up 56 days, 19:35, 3 users, load average: 0.32, 0.31, 0.32 cs299@cs:~> df -h Filesystem Size Used Avail Use% Mounted on /dev/root 1016G 229G 778G 23% / devtmpfs 498G 0 498G 0% /dev tmpfs 32M 2.3M 30M 8% /run tmpfs 498G 8.0K 498G 1% /dev/shm cgroup_root 8.0M 0 8.0M 0% /sys/fs/cgroup /dev/sda2 127G 22G 105G 17% /usr /dev/sda3 127G 8.3G 118G 7% /var /dev/sda4 64G 13G 51G 20% /tmp /dev/sda5 10T 2.8T 7.2T 28% /u1 /dev/sda6 4.0T 685G 3.3T 18% /net /dev/sda7 18T 6.9T 11T 40% /store cs299@cs:~> whoami cs299 cs299@cs:~> hostname cs.indstate.edu cs299@cs:~> pwd /u1/class/cs299