Linux ohjeita tai käsikirja

Mitä suositellaan avuksi Linuxin opettelemiseen?

Omasta mielestäni linuxin vs Windowsin erot, ovat niin pieniä, ettei peruskäyttäjän tarvitse juurikaan opiskella sen käyttöä, jos on käyttänyt aiemmin Windowsia.

Kirjallisuudesta omasta mielestäni Suomeksi yksi parhaista kirjoista on Raimo Kosken: “Linux Tehokas hallinta”, mutta silläkin alkaa olla ikää…, kun kirja taitaa olla julkaistu 2010.

Lisäksi en ole pitkään aikaan vilkaissut kyseistä kirjaa, joten en muista siitä kovinkaan paljoa.

Toinen luolakirjoitusten ajalta on Ubuntu tutuksi wikikirja:

Sitäkään ei ole päivitelty vähään aikaan suuremmin.

Itse opin foorumeiden lisäksi lehdistä kuten Linux Magazine, mutta suomenkielisiä Linux-lehtiä ei käsittääkseni ole.

Linux alkaa olla varsin laaja alue opiskeltavaksi, niin ehdotuksia voisi kohdentaa lähemmäksi, jos tietäisi mihin osa-alueeseen haluaisi tietoa syvennettävän.

Lisäksi nykyään hyvnä preppaajana voi toimia AI, joka mielellään auttaa ongelmissa, jotka osaa kuvata sanoiksi. Oli se sitten Linux:sta tai jostakin muusta.

AI on nykypäivänä kätevä apu asiaan kuin asiaan, mutta omaa osaamista pitää olla, vaikka Astra 6.0 laatii valmiita käsikirjoja aiheesta kuin aiheesta, tämmöisen tuloksen sain, kun kysyin Tier2 Helpparin ohjetta Serveriin, Terminalin must-do and must-check asiat, Linux Terminal: Below are two practical tables you can use as a helpdesk emergency cheat sheet.

60 Ubuntu Bash CLI emergency helpdesk one-liners

# Command What it does Example of use
1 uptime Shows uptime and load Check whether a server is overloaded
2 top Live process monitor See what is consuming CPU right now
3 htop Better interactive process view Troubleshoot a slow Ubuntu server
4 free -h Shows RAM and swap usage Confirm whether memory is exhausted
5 df -h Shows disk space usage Check whether / is full
6 df -i Shows inode usage Find inode exhaustion when disk looks fine
7 du -sh /var/* Shows largest folders in /var Identify huge logs or cache growth
8 `du -ah / sort -rh head -20`
9 `ps aux --sort=-%cpu head` Top CPU consumers
10 `ps aux --sort=-%mem head` Top memory consumers
11 pgrep -fl nginx Finds process by name Confirm whether nginx is running
12 pkill -f apache2 Kills matching process by name Stop stuck Apache worker processes
13 kill -9 <PID> Force-kills a process End a frozen process quickly
14 pstree -p Shows process tree Trace parent-child stuck processes
15 `watch -n 1 "ps aux --sort=-%cpu head"` Repeats command every second
16 systemctl status nginx Shows service status Check why website is down
17 systemctl restart nginx Restarts service Recover a failed web service
18 systemctl stop nginx Stops service Stop a service causing issues
19 systemctl start nginx Starts service Bring service back online
20 systemctl --failed Lists failed services Quick incident triage after boot
21 journalctl -xe Recent systemd logs Investigate recent system errors
22 journalctl -u nginx --since "15 minutes ago" Service logs in time window Check why nginx failed recently
23 journalctl -f Follows logs live Watch logs during restart
24 journalctl -b Current boot logs Investigate current boot problems
25 journalctl -b -1 Previous boot logs Analyze crash before reboot
26 `dmesg tail -50` Recent kernel messages
27 tail -f /var/log/syslog Follows syslog live Watch system messages during incident
28 tail -f /var/log/auth.log Follows auth log Check login failures
29 grep "Failed password" /var/log/auth.log Finds failed SSH logins Review brute-force attempts
30 ip a Shows IP addresses/interfaces Verify server NIC and IP
31 ip route Shows routing table Check default gateway issue
32 ip link Shows interface status Confirm if NIC is up/down
33 ping -c 4 8.8.8.8 Tests raw connectivity Verify internet reachability
34 ping -c 4 www-address Tests connectivity and DNS Check if DNS works
35 ss -tuln Shows listening ports Confirm app is listening
36 ss -tulpn Shows ports and owning processes Identify process bound to port
37 sudo lsof -i :80 Shows process on a port Find what uses port 80
38 traceroute www-address Shows path to host Investigate routing problem
39 nslookup www-address DNS lookup test Check DNS response
40 dig www-address Detailed DNS query Troubleshoot DNS records
41 resolvectl status Shows DNS resolver info Verify configured DNS servers
42 hostname -I Shows local IPs only Quickly copy server IP
43 curl -I http localhost Tests local HTTP response Check if web server responds
44 wget --spider http localhost Tests URL reachability Verify app health endpoint
45 `mount column -t` Shows mounted filesystems
46 sudo mount -o remount,rw / Remounts root read-write Emergency fix for read-only root
47 find / -type f -size +100M 2>/dev/null Finds big files Clean space urgently
48 find /var/log -type f -mtime +7 -delete Deletes old logs Free log partition space
49 find / -mmin -60 2>/dev/null Finds recently modified files Review files changed during incident
50 chmod 755 script.sh Fixes execute permissions Restore script permission
51 chown www-data:www-data /var/www/html -R Fixes ownership Repair website permission problem
52 whoami Shows current user Confirm whether you are root
53 who Shows logged-in users See active sessions
54 last Shows login history Review who logged in recently
55 sudo passwd -l username Locks user account Disable compromised account
56 sudo apt update Refreshes package list Prepare for updates or installs
57 sudo apt upgrade -y Installs updates Apply urgent package fixes
58 sudo apt --fix-broken install Repairs broken package state Resolve interrupted install issue
59 sudo dpkg --configure -a Finishes incomplete package config Recover from failed upgrade
60 sudo reboot Reboots the system Final recovery step after fixes