Type: Walkthrough
Difficulty: Info
Tags: Linux
Meta Tags: Walkthrough, Walk-through, Write-up, Writeup
Subscription type: Premium
Description:
Continue your learning Linux journey with part two. You will be learning how to log in to a
Linux machine using SSH, how to advance your commands, file system interaction.
Room link: https://tryhackme.com/room/linuxfundamentalspart2
Login to the machine using ssh with the credentials tryhackme:tryhackme
┌──(kali㉿kali)-[/mnt/…/TryHackMe/Walkthroughs/Info/Linux_Fundamentals_Part_1-3]
└─$ ssh tryhackme@10.10.248.104
The authenticity of host '10.10.248.104 (10.10.248.104)' can't be established.
ED25519 key fingerprint is SHA256:p5icoIi8kJsmDO+nZgedjYvBWn88Lgb5VZ7nj7CaFys.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.10.248.104' (ED25519) to the list of known hosts.
tryhackme@10.10.248.104's password:
Welcome to Ubuntu 20.04.6 LTS (GNU/Linux 5.15.0-1075-aws x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
System information as of Mon Feb 3 19:38:26 UTC 2025
System load: 0.37 Processes: 114
Usage of /: 28.3% of 9.62GB Users logged in: 0
Memory usage: 5% IPv4 address for ens5: 10.10.16.227
Swap usage: 0%
Expanded Security Maintenance for Applications is not enabled.
0 updates can be applied immediately.
Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status
The list of available updates is more than a week old.
To check for new updates run: sudo apt update
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
tryhackme@linux2:~$ Useful commands:
- man
The result of man ls is
LS(1) User Commands LS(1)
NAME
ls - list directory contents
SYNOPSIS
ls [OPTION]... [FILE]...
DESCRIPTION
List information about the FILEs (the current directory by default). Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.
Mandatory arguments to long options are mandatory for short options too.
-a, --all
do not ignore entries starting with .
-A, --almost-all
do not list implied . and ..
--author
with -l, print the author of each file
-b, --escape
print C-style escapes for nongraphic characters
<---snip--->Answer: down
<---snip--->
-G, --no-group
in a long listing, don't print group names
-h, --human-readable
with -l and -s, print sizes like 1K 234M 2G etc.
--si likewise, but use powers of 1000 not 1024
-H, --dereference-command-line
follow symbolic links listed on the command line
<---snip--->Answer: -h
Useful commands:
- cp
- file
- mkdir
- mv
- rm
- touch
Hint: Look at the answer formatting - we're not expecting quotation marks for this
tryhackme@linux2:~$ touch newnote
tryhackme@linux2:~$ Answer: touch newnote
tryhackme@linux2:~$ file unknown1
unknown1: ASCII textAnswer: ASCII text
tryhackme@linux2:~$ ls
important myfile myfolder newnote unknown1
tryhackme@linux2:~$ mv myfile myfolder/
tryhackme@linux2:~$ ls
important myfolder newnote unknown1Answer: mv myfile myfolder
tryhackme@linux2:~$ cat myfolder/myfile
THM{FILESYSTEM}Answer: THM{FILESYSTEM}
Useful commands:
- su
tryhackme@linux2:~$ ls -l important
-rw-r--r-- 1 user2 user2 14 May 5 2021 importantAnswer: user2
Note: The password is user2
tryhackme@linux2:~$ su user2
Password:
user2@linux2:/home/tryhackme$ Answer: su user2
user2@linux2:/home/tryhackme$ cat important
THM{SU_USER2}Answer: THM{SU_USER2}
Common directories:
/etc, short for etcetera, contains configuration and other system files/var, short for variable data, contains data from services and applications/root, home folder for therootuser/tmp, short for temporary, used to store data that is only needed temporarily
Answer: /var/log
Hint: The contents of this root directory do not persist after reboot
Answer: /tmp
Answer: /root
For additional information, please see the references below.
- cat - Linux manual page
- cd - Linux manual page
- cp - Linux manual page
- echo - Linux manual page
- file - Linux manual page
- find - Linux manual page
- grep - Linux manual page
- Linux - Wikipedia
- ls - Linux manual page
- man - Linux manual page
- mkdir - Linux manual page
- mv - Linux manual page
- pwd - Linux manual page
- rm - Linux manual page
- ssh - Linux manual page
- su - Linux manual page
- touch - Linux manual page
- wc - Linux manual page
- whoami - Linux manual page