Author: Skippy

  • Windows Server Must-Know Commands

    Here is list of some useful commands that can be typed directly in Command Prompt

    \> Powershell

    Elevates Command Prompt console to powershell

    \> Invoke-GPUpdate -Computer COMPUTER02 -RandomDelayInMinutes 0

    Forces group policy update on a desired computer in local network. Change 0 to a desired number of minutes. This will specify the delay until the command will be executed.

     \> netstat -sp tcp

    Displays all established tcp connections with its port number and ip address

    \> ipconfig /all

    Displays full IP Configuration

    \> sfc /scannow

    In Powershell scanns and repairs corrupted system files

    \> Dism /Online /Cleanup-Image /RestoreHealth

    In Powershell scanns and repairs corrupted system files

  • Light weight GUI Installation on Ubuntu Server

    When running a server I strongly recommend to use commands as the means of operating your services. Firstly, it makes your system lighter, secondly it poses less system vunlerabilities and instabilities. But of course if you seek to make your life a bit easier, I propose to install the lightest GU interface possible. In our case it is going to be Lubuntu-Core

    Step 1 – Install Tasksel

    Tasksel allows to install different Desktop environments. Let us install it on our server. $ sudo apt-get install tasksel  Step 2 – List all available environments$ tasksel –list-task

    here you will see all the possible environments. For the purpose of this tutorial we choose Lubuntu-Core

    Step 3 – Lubuntu – Core Installation

    $ sudo tasksel install lubuntu-core

    Step 4 – Start the new desktop environment

    In order to start the service please type the following command:

    $ sudo service light_dm start

    Step 5 – Reboot the server

    $ reboot -f

    After reboot you will land on Login screen with graphical interface

  • Linux Must-Know Commands

    In each operating system there are must-know command lines, which will significantly improve your effecivness is managing your system. Here are a few chosen ones, which I strongly suggest to memorise by heart 

    $ uname -a

    Displays kernel version

    $ ifconfig

    Displays full IP configuration

    $ ip addr show eth0

    Similarly to ifconfig – shows the ip config of the physical network adapter

    $ df -ah

    Shows Disk space usage

    $ service udev status

    Shows services status: Note that this is an old version syntax. You might need to use the next command version

    $ systemctl status udev

    Shows sevrvices status (new version)

    $ du -sh home

    Shows disk usage for /Home folder

    $ netstat -tulpn

    Shows active internet connections. It shows which process / service is listening on which port. IT gives information about Program name and Process ID

    $ top

    Information about processes

    $ htop

    Information about processes

    $ man

    e.g. $ man ifconfig

    This will open the manual for any command explaining to you the purpose of a command and its options

    $ sudo etc/init.d/ stop

    e.g. $sudo etc/init.de/apache2 stop

    This will stop any service that you type in. You can use:

    stop, start or restart as an option to this command

    $ ls

    $ ls -l
    $ ls -a
    $ ls -la

    LS lists all the files in a directory.

    Parameter -a displays all filess inc. hidden files.

    Parameter -l displays all information about the files and folders

    $ tcpdump

    Listen to traffic on a chosen port.

    tcpdump -ni eth0 udp and port 1194