{"slug": "i-thought-i-knew-linux-then-i-actually-learned-it-week-1", "title": "I Thought I Knew Linux — Then I Actually Learned It (Week 1)", "summary": "A developer recounts their first week of truly learning Linux, covering fundamental concepts such as the kernel, user modes, file permissions, and essential commands. The post explains the difference between absolute and relative paths, shell and environment variables, and process management. It also introduces redirection, pipes, symbolic links, and the tar command.", "body_md": "Before you read this doc you must know english is my second language and this doc is have completely my own words not any AI, translator etc.\n\nAn Operating System is software that manage every system resources and it also manage - Hardware, Kernel, and User space.\n\nKernel mode handle every hardware related work and this is only thing that manage hardware. User mode is just showing us to running programs like right now you are in User mode, you never touch any hardware related things.\n\nUsers are very important part of the OS bcz it create wall of processes and a single server can manage multiple users.\n\nEvery user gets a UID so the kernel identify the user.\n\nThis is the BOSS of the system he can do anything in the system without any confirmation model and one more thing the root can do anything but it doesn't mean root have kernel mode this is steel in the user mode.\n\nEvery user have a group and we can manage the permissions on the group so we easily add/remove users from group.\n\nThe shell is a program where we run commands. shell is a interface between kernel and users.\n\nprogram + options + argument. ls -l /home\n\nls - program\n\n-l - option\n\n/home - argument\n\nls - list the data(files & Directories)\n\ncat - View the inside file\n\necho - print something\n\ntouch - create a file\n\ncp - copy anything\n\nmv - move anything\n\nrm - remove anything(you only remove files & directories that access you have)\n\npwd - present working directory\n\ncd - change directory\n\nmkdir - create directory\n\nrmdir - remove empty directory\n\nAbsolute path mean full path of the file for example:- /home/user/directory/test.txt\n\nRelative path mean only current folder path for example:- directory/test.txt\n\ngrep - this cmds grep the exact line what we want(grep \"findme\" file.txt). -i(case insensitive) and -v(this exclude lines that containing findme) is options of this cmd.\n\nsort - sort lines alphabetically.\n\nhead - bydefault print 10 top lines(head filename.txt)\n\ntail - bydefault print 10 bottom lines(tail filename.txt)\n\nless - not print everything in single time it wait for your keys(up, down, q etc.)\n\nfind - this find in the subfolders also(but ls find only on the current directory)\n\nlocate - quickly find files and direcotries\n\ndiff - check differences between two files\n\nfile - details of any file\n\nShell variable are the private variables of the shell we can't use them in child programs but environment variable can do but before it we need to export that.\n\nshell find cmds on the $PATH not in the whole system if sometime the program is installed but the shell throe error like (command not find) it mean that cmd is not in the $PATH\n\nvi, vim, nano, these are the terminal editors.(vim filename.txt)\n\nGetting Help: man, man -k, --help. (-k mean search keyword)\n\nRedirection & Pipes: >(> mean overwrite the content), >>(>> mean append the text), | (| mean get output preview cmd)\n\nProcess is a running instance of the program and every process have a PID(we can kill the process by their PID)\n\nps: Show running Processes\n\nps aux: Show running processes with details\n\nkill : kill process by their PID\n\nkill -9 : forcefully kill the process\n\ncmd &: & used for run process in background\n\nctrl c: stop running process from screen that running right now on screen\n\nWhen we run the ls -l command you see something like this:-\n\n-rwx-w-rw- 1 username groupname so on....\n\nBreakdown of this:-\n\nchmod - it mean change mode so you can change the permissions like chmod 747. each permission have a number:-\n\nread - 4\n\nwrite - 2\n\nexecute - 1\n\nif we want read(4) and write(2) permission to owner just run this command chmod 600. 00 mean no permission to group and other.\n\nand we use something like chmod u+x, u+r. it mean please add execute and read permission for user(owner).\n\nSymbolic link just like shortcut in window and alias in mac.\n\nCommands for linux:-\n\nln -s target linkname\n\nthe -s stand for symbolic link OR soft link.\n\ntar mean bundle of the files & directories.\n\nif you want to create a bundle just run this cmd:- tar -czf filename.tar yourstuffs\n\nOptions of the cmd:-\n\n-czf - mean create\n\n-tzf - mean show the list inside bundle\n\n-xzf - mean extract the bundle\n\ngzip mean compress the file size of the bundle. it only used for create bundle + compress the size.\n\n.tar.gz\n\nIn linux root you see this directories:-\n\netc, home, var, usr, tmp etc.\n\nThis directory have only configuration related data.\n\nThis is only for users. how many users with there personal data.\n\nThis directory for the logs of the system and logs are inside /var/log\n\nThis directory have most installed programs and /usr/bin have linux commands.\n\nThis directory have temporary data as it name.\n\nEvery linux user should know about this topic. coz it is very important to know. in linux you can't delete,view,run anything without permission and every user have permissions to what to do or not. some users have sudo access it mean they can install, delete anything in system without any permission bcz they have root access sudo stand for super user.", "url": "https://wpnews.pro/news/i-thought-i-knew-linux-then-i-actually-learned-it-week-1", "canonical_source": "https://dev.to/dharam_in/i-thought-i-knew-linux-then-i-actually-learned-it-week-1-2ep9", "published_at": "2026-06-21 05:10:22+00:00", "updated_at": "2026-06-21 05:36:52.716780+00:00", "lang": "en", "topics": ["developer-tools"], "entities": ["Linux"], "alternates": {"html": "https://wpnews.pro/news/i-thought-i-knew-linux-then-i-actually-learned-it-week-1", "markdown": "https://wpnews.pro/news/i-thought-i-knew-linux-then-i-actually-learned-it-week-1.md", "text": "https://wpnews.pro/news/i-thought-i-knew-linux-then-i-actually-learned-it-week-1.txt", "jsonld": "https://wpnews.pro/news/i-thought-i-knew-linux-then-i-actually-learned-it-week-1.jsonld"}}