LIVE NEWSROOM · --:-- · May 16, 2026
A LIBRARY FOR SECURITY RESEARCHERS

Basic Linux commands and their functions

Post on X LinkedIn
Basic Linux commands and their functions
ciphers security

Hello everyone 🙂 anukram here and today I came up with exciting things you all want to know: Linux commands. Today in this article we will discuss most Linux commands and their description example with their working and logic behind them.

Linux is first introduced in 1991, as in CLI (Command line interface). Which is designed for developers and programmers for making their work easy. But most people when they hear the word Linux think, ohh Linux CLI is very complicated and hard to use for regular people. Sometimes this thought is true because not everyone is able to use Linux. The person who wants to use Linux needs to practice and learn its commands for proper working.

So for beginners and even professionals if you missed any of the commands then this will help you with most of the Linux commands. After going through all the things written over here you’ll be able to know all the commands for basic starting in Linux OS.

Most probably Linux is used for many things server, deployment, security audits, security testing, maintaining services, etc. Linux is most popular is users who are involved in the security of any type like network security, computer security, mobile security, server security, etc.

// 01 Linux Commands you should know

So let’s start with having a look at all the commands over here

commandcommand full formsyntaxFunction
cdChange DirectorycdIt is used to bring you back to your home directory
cdchange directorycd ../it will bring you one directory back
cdChange directorycd ../../brings you two directories back
pwdPresent working directorypwdIt is used to check which directory you’re working
lslistlsthis cmd shows you the all items in your present directory
ls -Rlist itemsls -Rit will list all items in your directory with all items in sub-directories.
clearClearingclearthis is used to clear your terminal or screen. You can do it by using CTRL+L.
mkdir <name for directory>Make directorymkdir test-directorythis command will create a directory with the name test-directory. Basically, it is used to create new directories.
touch <file-name>Touchtouch new-file.txtso this creates a text file named new-file in your directory. basically, this command is used to create new files which could a text, bat, word, etc.
rm <file-name>Removerm new-file.txtthis will delete your file which is new-file.txt permanently. This command is used to delete files only.
rmdir <directory-name>Remove Directoryrmdir test-directorythis will delete the test-directory but only if the test-directory is empty or else it will give an error that the directory is not empty.
So this command is used to delete empty directories.
rm -r <directory-name>Remove directory recursivelyrm -r test-directoryThis deletes your test-directory if it is containing anything in it then also it will remove it. So this command is used to delete any directory either if it contains any document.
sudoSuperUser Dosudo <command you want to run>sudo enables the admin or privileged user permission with any command. If you want to run any command as root then you need to use sudo before the command.
sudo suSuperUser Do Switch Usersudo suit will switch you to root user privileges. Basically, sudo su is used for switching between the different users in the OS.
apt-get updateAptitude Get Updatesudo apt-get update,
sudo apt update
this is used to resynchronize your packages by the help source.list file from your OS. In general terms, you can say that this is used to sync your application to the current day for getting updates.
apt-get upgradeAptitude get upgradesudo apt-get upgrade,
sudo apt upgrade
this will upgrade or update your application or package to its newest version. it will update your installed packages and application to their latest or newest version.
apt-get full-upgradeaptitude get fully upgradesudo apt full-upgradethis command will fully upgrade all packages and applications, and it will delete the old version of it. With this command, we can save disk space while upgrading our packages and application.
apt-get installAptitude get install packagesudo apt-get install <package-name>this command will help you to install any package or application from the terminal.
user addAdding a new usersudo useradd <user-name>So basically this command is used to create a new user into the OS.
manmanualman <command-name>this is used to get all the information of how this command is working in background.
passwdPassword setsudo passwdthis command is used to change root user login password
passwdPassword setsudo passwd <user-name>again same command but this command is used to change the login password of a particular user
whoamiCheck userwhoamithis is used to check the current logged-in user’s name from terminal
bashBash Shellbashthis is used to enter in the bash shell mode
chownChange ownershipsudo chown <user-for-assinging:group-name> <file-name>so this command is used to change the ownership of any file to any user and group.
usermodModerating usersudo usermod -a -G <group-name> <user-name>this command is used to add any user to any group. here in the command -a=add, -G= group-name.
userdelDelete Usersudo userdel <user-name>By this, you can delete any user
cpCopysudo cp <file-name/dir-name> <path>this will help with copying anything from one place to another
mvMovingsudo mv <file-name/dir-name> <path>this is the same as copy command but here we are moving the thing which means it will get deleted from its last location

// 02 Permission Management on Linux

ciphers security Debian
PermissionNumber
Read permission4
Write Permission2
Execute Permission1
No Permission0

To change the permission of any file

chmod <permission-number> <file-name\\directory-name>

imagine that we have a file test.txt and we want o give read,write,and execute permission to user and read and write permission to group and read permission for others then

chmod 764 test.txt

To give/remove execute permission for other user

chmod o+x <file-name>

for removing execute permission

chmod o-x <file-name>

// 03 command for checking the path of password and shadow file

path of password file is  /etc/passwd

path of shadow file is  /etc/shadow

Note:- password file is owned by the root. So by this, we can say that the user root has the read and write permission of the password file. Shadow has also the same permission as the password file with the root user.

Shadow file is a very confidential file for our system because it contains all password hashes in it.

    TE
    Team Ciphers Security

    The Ciphers Security editorial team — practitioners covering daily threat intel, CVE deep-dives, and hands-on cybersecurity research. About us →

    Previous Depends: libvpx6 (>= 1.6.0) but not installable solution Next What are IP Address and MAC Address explaination

    Latest News

    YARA-X 1.16.0: Faster Scans, Panic Fixes, and Neovim LSP Support YARA-X 1.16.0 ships with performance improvements across 10 PRs, constant folding for bitwise ops, configurable mat… Instructure Removed from ShinyHunters' Leak Site as Canvas Breach Deadline Passes Instructure was quietly removed from ShinyHunters' extortion site after the May 12, 2026 deadline — no data dump, n… Costa Rica Joins Have I Been Pwned as the 42nd Government Costa Rica's CSIRT gains free access to Have I Been Pwned's government domain monitoring service, becoming the 42nd… LummaC2 Infostealer Targets US Critical Infrastructure: CISA-FBI Advisory AA25-141B and DOJ Domain Seizures CISA and FBI advisory AA25-141B details LummaC2 MaaS infostealer TTPs targeting critical infrastructure. DOJ seized… MacSync Stealer: Hackers Abuse Google Ads and Claude.ai Chats to Push Mac Malware Russian-speaking attackers combine Google Ads and Claude.ai shared chats in a ClickFix campaign deploying MacSync S… JDownloader Site Hacked, Installers Swapped with Python RAT Malware JDownloader's website was hacked May 6–7, 2026, replacing Windows and Linux installers with a Python-based RAT. Use… Operation HookedWing: 4-Year Phishing Campaign Hits 500+ Organizations Across Aviation, Energy, and Logistics Operation HookedWing has stolen credentials from 500+ organizations in aviation, energy, logistics, and critical in… Twelve Critical vm2 Node.js Vulnerabilities Enable Sandbox Escape and Arbitrary Code Execution A dozen CVEs in the vm2 Node.js sandbox library — including CVSS 10.0 flaws — allow sandbox escape and RCE. Update …
    Scroll to Top