The VX-Files
The VX-Files
  • README.txt
  • For updates, questions, suggestions or just chatting: @malcrvz
  • Download your own local copy or check my other libre projects: Github/malcrvz
  • 📕Cybersecurity Theory
    • Index
      • Malware types
        • Viruses, worms and Trojans
        • Backdoors, Rootkits and Spyware
        • Botnets, DDoS and Spammer
        • Ransomware
        • Scareware and Adware/PUP/PUA
        • Downloaders and Launchers
        • Hacktool
        • APT - Advanced Persistent Threat
      • Social engineering techniques
        • Phishing
        • Pretexting
        • Baiting
        • Quid pro quo
        • Tailgating
      • Cryptography
        • Hash functions
        • Symmetric, Asymmetric and Hybrid cryptography
        • Digital signatures & Digital certificates
        • TLS Protocol
      • Pentesting methodology & Techniques
        • CIA Triad - Confidentiality, Integrity & Availability
        • The methodology steps
        • Pre-Engagement
        • Information Gathering
          • HTTP status codes
          • robots.txt
        • Vulnerability Assessment
        • Exploitation
          • Password cracking
        • Post-Exploitation & Persistence
          • Types of Shells
        • Privilege Escalation & Lateral Movement
        • Reporting & Remediation
  • 🐧Linux Essentials
    • Index
      • 1, 0, bits, Bytes: Units of digital information
      • User management
      • Packet management
      • Privileges & sudo
      • Passwd & Shadow files
      • Managing files, links and regex
      • find
      • Terminal/TTY
      • SSH
  • 🪟Windows Essentials
    • Index
      • CLI user management
      • CMD File management
  • 🌍Networking Essentials
    • Index
      • Windows CLI IP management
      • Linux IP management
      • Linux CLI Wi-Fi connection
  • 🕸️Network Pentesting
    • Tools
      • 1. Pre-Engagement
        • OpenVPN
      • 2. Information gathering
        • cURL & wget
        • Nmap
        • arp
        • Netcat
        • whatweb
      • 3. Vulnerability assessment
        • smbclient
      • 4. Exploitation
        • Metasploit
        • Hashcat
        • John the Ripper
      • 5. Post-Exploitation & Persistence
        • SSH
      • 6. Privilege escalation & Lateral movement
        • Possible privilege escalation vectors - Auto-enumeration scripts
      • 7. Reporting & Remediation
    • Techniques
      • Upgrade reverse shell to interactive
      • Transferring files to/from remote victim
      • Possible privilege escalation vectors - Manual checklist
    • Resources
      • Manufacturer default passwords lists
        • IP Cameras
      • Get Shells
  • 💉Web App pentesting
    • Tools
      • CeWL
      • Gobuster
      • whatweb
    • Techniques
      • Command injection
    • Resources
      • Reverse Shells
      • Bind Shells
  • 📡Wireless pentesting
    • Tools
    • Techniques
    • Resources
  • 🔓On-Premises Pentesting
    • Tools
    • Techniques
      • Removing Linux user passwords
      • Removing Windows user passwords
    • Resources
  • 💽Disks & Forensics
    • Index
      • Getting a disk ready
      • Inodes & Sectors
      • Recover deleted files
      • BUILDING - Secure file deletion
  • 🕷️Bash scripts
    • coming soon
  • ⚡PowerShell Scripts
    • coming soon
  • 🟩HTB Walkthroughs
    • coming soon
  • 🏴‍☠️External Resources
    • Schools
    • Books & Wikis
    • Utilities
    • Interactive cheat sheets
    • Wordlists
Powered by GitBook
On this page
  1. Linux Essentials
  2. Index

Terminal/TTY

TL;DR: in a practical way they are almost the same!

Terminal (or Terminal Emulator) is the software that gives us a graphical interface to interact with a TTY, the window that contains the prompt where we give commands to the computer that we are accustomed to use in our Kali Linux for example.

TTY (Teletype) is a text-based interface for interacting with the computer, what is underlying the terminal.

Every time you open a terminal you are interacting with a TTY, just in a more user-friendly way.

The command tty shows in which TTY session you are currently. For example:

$ tty
/dev/pts/0

Every terminal window you open will be assigned to a new one(try it!), so if for example you open 5 terminals the last one will be on:

$ tty
/dev/pts/4         #Remember 0 counts, so 5-1!

But instead of TTY we see pts?

These pts or "pseudo-terminals" will be inside your current TTY, they are like matryoshka dolls and they are given to your terminal software.

To know which TTY session you are currently on just enter the command who That will show what users are logged in and which TTY they are using, useful for remote connections.

The TTY where I have my graphic interface installed on this Kali virtual machine happens to be the tty7 (depends on the distro), so when I enter tty I get /dev/pts/0 but you can change to other TTYs by pressing

ctrl + alt + F1 to F7

or entering the command:

chvt n "n" as the interface number

and you will have an only TTY screen, in a different session, and then when you enter tty you will see /dev/tty1 (or whatever number you chose) because they are the whole TTY not a software pseudo-terminal.

This is very handy for troubleshooting or if you need a clean screen and all the resources you can for a specific task.

Its also used for remote administration and isolating sessions, you can have multiple accounts, remote connections, with different users in the same system, at the same time, with just a shortcut, all them protected by credentials, using only terminal emulator windows its all in the same login and can become pretty chaotic if there's more than one user.

But most importantly for us, we can check the logs for unusual TTY sessions in a system, monitor

Last updated 1 year ago

🐧