Skip to content

Latest commit

 

History

History
90 lines (78 loc) · 4.58 KB

linux.md

File metadata and controls

90 lines (78 loc) · 4.58 KB

Linux

Ubuntu

Links

VMWare

Installing VMWare Tools

Command line sequence to install the tools. Note that the version of tools changes, so you need to update that one:

sudo-s
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
cp /mnt/cdrom/VMwareTools-10.1.6-5214329.tar.gz /tmp/
cd /tmp
tar -zxvf VMwareTools-10.1.6-5214329.tar.gz 
cd vmware-tools-distrib/
./vmware-install.pl -d
umount /mnt/cdrom
cd
rm /tmp/VMwareTools-10.1.6-5214329.tar.gz 
rm -rf /tmp/vmware-tools-distrib/

Remote Access From Windows

Remote Desktop Protocol

For Virtual Machines

Make sure the network settings for the VM are set to Bridged (not NAT).

SSH

On the Linux server:

sudo apt-get install openssh-server

On the Windows client, install Putty. You can also add a new task in ConEmu: "C:\Program Files\PuTTY\putty.exe" -cur_console -ssh 192.168.159.130 (replace it with your server's IP).

Command Line Cheatsheet

  • apt-get update- updates the package lists
  • cd - moves to the home directory
  • cp -a source destination - copies source to the destination, recursively and by keeping attributes
  • cp -arv source destination - copies source to the destination, recursively and by keeping attributes, and it also shows what is being done
  • df - shows disk usage
  • find -name somefile - finds all ocurrences of somefile in the directory and subdirectories
  • free - shows memory usage
    • ```free -hw -c 10 -s 5` - shows memory usage in human-readable form, every 5 seconds for 10 times
  • hostname -I - find the IP of the computer
  • kill -9 12345 - kill process whose ID is 12345
  • lsb_release -a - find the distro and version of your Ubuntu machine
  • ls -l - list files using a long listing format
  • netstat -an | grep "LISTEN" | grep ":3389" - find if any application is listening on port 3389
  • pidof process_name - finds the process ID of a process
  • pm-suspend - put computer to sleep
  • pwd - displays the current directory ("print working directory")
  • sudo reboot - reboots the machine
  • rm -r <dir> - removes a directory and its contents
  • shutdown now - powers off the computer (now)
  • shutdown -r now - restarts the computer (now)
  • xfce4-session-logout - logs out of session (XFCE4)

Keyboard Shortcuts

Terminal

  • Ctrl+U - clears the current line ine the terminal

Misc

System Restart

When System Restart Required is show, you can view the list of packages that require a restart with:

more /var/run/reboot-required.pkgs

To restart, do:

sudo reboot