Last updated on Sep 7, 2024, 19:56 by mokubo3
Starting a CS or CNIT career can be challenging, especially if you’ve never worked with Linux[1] before. Many CS and CNIT classes use Hills Linux. As a CS tutor, I’d like to share some tips that might be useful to help students get started with their first assignment on Hills Linux.
Hills server is running on the open-source[2] operating system Linux. Open-source means that the source code is public and built and maintained by contributors. Open-source projects supported by many developers tend to be safer and less prone to malware or other vulnerabilities compared to proprietary counterparts such as Windows or macOS.
You may have been given instructions on how to connect to Hills using PuTTY[3]. Here, I would like to introduce you to how to use the ssh
command in your terminal on macOS, Linux, or PowerShell on Windows.
[~] > ssh <username>@hills.ccsf.edu <username>@hills.ccsf.edu's password: ********************************************************** * W A R N I N G ! * * * * BY ACCESSING AND USING THIS SYSTEM YOU CONSENT TO * * SYSTEM MONITORING FOR LAW ENFORCEMENT AND OTHER * * PURPOSES. * * * * UNAUTHORIZED USE OF THIS COMPUTER SYSTEM MAY SUBJECT * * YOU TO CRIMINAL PROSECUTION AND PENALTIES. * * * * DO NOT COPY OR INSTALL ANY ILLEGAL OR UNLICENSED * * SOFTWARE ON THIS COMPUTER SYSTEM! * * Refer to CCSF Computer Usage Policy for additional * * information: http://www.ccsf.edu/Policy/NEWpolicy.html * * * * INTERNSHIP INFORMATION is in /pub/cs/internships.txt * * * ********************************************************** Last login: Sat Sep 7 13:13:43 2024 from 255.255.255.0 [test-user@hills ~]$
Once connected, you'll see ~ as your home directory, which was created by the IT department when you signed up for the class.
[test-user@hills ~] ping ccsf.edu PING example.com (123.45.67.89) 56(84) bytes of data. 64 bytes from example.com (123.45.67.89): icmp_seq=1 ttl=53 time=22.7 ms 64 bytes from example.com (123.45.67.89): icmp_seq=1 ttl=53 time=22.8 ms 64 bytes from example.com (123.45.67.89): icmp_seq=1 ttl=53 time=22.7 ms 64 bytes from example.com (123.45.67.89): icmp_seq=1 ttl=53 time=22.6 ms ^C --- ccsf.edu ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3000ms rtt min/avg/max/mdev = 20.000/22.000/25.000/0.150 ms [test-user@hills ~]
Lists files in the current directory. Use ll
for a more detailed listing.
Changes the current directory to newdir
.
Creates a new directory called newdir
.
Removes the file called myfile
(replace myfile
with your file’s name).
Copies oldfile
and names the copy newfile
.
Moves or renames oldfile
to newfile
.
Displays the content of myfile
on the screen.
Similar to cat
, but shows content one page at a time. Press space for the next page, or "q" to quit.
Starts logging terminal output to a file called myscript.txt
. Remember to use exit
to stop logging.
Logs out or stops logging if using script
.
Stops a running program. If your program is stuck or looping, use Ctrl-C
to stop it. Make sure to stop any running programs before closing the terminal.
Shows the manual page for a command. For example, use man ls
to get more details about the ls
command.
Checks how much storage space you’ve used and how close you are to the limit.
Both nano
and pico
work similarly. To create a new file, just type nano
in the terminal. To edit an existing file, use nano filename
(replace filename
with the actual file name). Save with Ctrl-o
and exit with Ctrl-x
. Commands are displayed at the bottom. To insert a saved file into the one you're editing, press Ctrl-R
.
If you have questions about your class or assignment, I recommend asking your TA or Professor. You can also get help from the CS Tutoring Squad at Batmale Hall 301 (ACRC) or via CS Tutor Zoom. For more information, please visit the Comupter Science Tutor Squad website to see the tutoring schedule, Zoom link, and make an appointment.