Setting up a Counter-Strike 1.6 server using SteamCMD

32/64 bit Debian/Ubuntu Linux procedure

When using 64 bit Debian/Ubuntu begin with step 1. When using 32 bit Debian/Ubuntu start with step 4.

1.  sudo add-apt-repository multiverse
2.  sudo apt install software-properties-common
3.  sudo dpkg --add-architecture i386
4.  sudo apt update
5.  sudo apt -y install lib32z1 lib32gcc-s1 lib32stdc++6 libstdc++6:i386 libsdl2-2.0-0:i386 libcurl4-gnutls-dev:i386 libc6-i386 net-tools wget xz-utils unzip zip gdb mlocate screen steamcmd
6.  steamcmd

Some warnings might show up during the installation process:

	- ln: failed to create symbolic link '/home/user/.steam/root': No such file or directory
	- ln: failed to create symbolic link '/home/user/.steam/steam': No such file or directory
	- ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt".
	- Loading Steam API...dlmopen failed: cannot open shared object file: No such file or directory
	- dlmopen failed: cannot open shared object file: No such file or directory

These warnings have no further meaning and can be ignored for now.

7.  Steam> force_install_dir /home/username/cs16		<- change the username to yours!
8.  Steam> login anonymous

	Connecting anonymously to Steam Public...OK
	Waiting for client config...OK
	Waiting for user info...OK

9.  Steam> app_update 90 -beta steam_legacy validate

	- When you see this error:
	Error! App '90' state is 0x10E after update job.

	- Just retry the command 'app_update 90 -beta steam_legacy validate' till you see this:
	Success! App '90' fully installed.

10. Steam> quit

11. mkdir -p .steam/sdk32 && cd ~/.steam/sdk32/ && ln -s ~/.local/share/Steam/steamcmd/linux32/ ~/.steam/sdk32/ && cd ~/
12. mkdir -p .steam/sdk64 && cd ~/.steam/sdk64/ && ln -s ~/.local/share/Steam/steamcmd/linux64/ ~/.steam/sdk64/ && cd ~/.steam
13. ln -s ~/Steam/ root && ln -s ~/Steam/ steam && cd ~/cs16

14. screen
15. ./hlds_run -game cstrike -pingboost 2 +map de_dust +maxplayers 16
16. When starting the server for the first time, it might crash with the following message:

	FATAL ERROR (shutting down): Unable to initialize Steam.

17. If that happens, no worries. Just press CTRL + c
18. Start the server again with the same line
19. ./hlds_run -game cstrike -pingboost 2 +map de_dust +maxplayers 16
20. After a few seconds and some stuff in your console you should see the following:

	Connection to Steam servers successful.
	VAC secure mode is activated.

21. The server is running, you can check this bij typing 'status', you should see the following:

	hostname:  Counter-Strike 1.6 Server
	version :  48/ 8684 secure  (10)
	tcp/ip  :
	map     :  de_dust at: 0 x, 0 y, 0 z
	players :  0 active (16 max)

	#      name userid uniqueid frag time ping loss adr
	0 users

22. CTRL a + d (detached)
23. Done! You now have a fully functional Counter-Strike 1.6 server running without mods/scripts.
24. Click here for "tweaking" your server with small adjustments and make it your own!

In case you made a boo-boo

In case you made mistakes and would like to start over or for whatsoever reason want to delete everything, I have a nice 
and quick solution for that.

1.  cd
2.  vi remove_cs16
3.  sudo rm -rf cs16/ .cache/ .local/ Steam/ .steam/ .wget-hsts .lesshst && sudo apt-get remove steamcmd --purge && sudo updatedb && sudo apt autoremove && sudo locate steam
4.  chmod 755 remove_cs16

	- You can now execute the file over and over again:

5.  ./remove_cs16

All installed files and folders are now removed and you can start over from scratch 😓