BASIC LIBNUX COMMANDS AND TOOLS

BASIC LIBNUX COMMANDS AND TOOLS

1. File & Directory Management

CommandDescriptionExample
pwdShow current directorypwd
lsList filesls -l
cdChange directorycd /home/user
mkdirCreate directorymkdir test
rmdirRemove empty directoryrmdir test
rmRemove file/directoryrm file.txt
cpCopy filescp file.txt backup.txt
mvMove/rename filesmv old.txt new.txt
touchCreate empty filetouch file.txt
findSearch filesfind . -name file.txt


2. File Viewing & Editing

CommandDescriptionExample
catDisplay file contentcat file.txt
lessView file page by pageless file.txt
headFirst 10 lineshead file.txt
tailLast 10 linestail file.txt
nanoSimple text editornano file.txt
vimAdvanced editorvim file.txt

3. Search & Text Processing

CommandDescriptionExample
grepSearch text in filesgrep "word" file.txt
sortSort linessort file.txt
uniqRemove duplicatesuniq file.txt
wcCount words/lineswc -l file.txt
cutExtract columnscut -d',' -f1 file.csv
awkText processingawk '{print $1}' file.txt
sedStream editorsed 's/old/new/' file.txt


4. User & Permission Management

CommandDescriptionExample
whoamiCurrent userwhoami
idUser ID infoid
chmodChange permissionschmod 755 file.sh
chownChange ownershipchown user file.txt
sudoRun as adminsudo apt update

5. System Monitoring
CommandDescriptionExample
topReal-time processestop
htopEnhanced process viewerhtop
psProcess statusps aux
dfDisk spacedf -h
duDirectory sizedu -sh folder
freeMemory usagefree -h
uptimeSystem running timeuptime

6. Networking

CommandDescriptionExample
pingTest connectivityping google.com
ifconfigNetwork config (older)ifconfig
ipNetwork managementip addr
netstatNetwork statusnetstat -tuln
ssSocket statisticsss -tuln
curlTransfer datacurl example.com
wgetDownload fileswget file_url



Helpful Shortcuts

  • Ctrl + C → Stop process

  • Ctrl + Z → Suspend process

  • Tab → Auto-complete

  • history → Show command history

  • clear → Clear terminal


  • mkdirCreate directorymkdir test
    mkdir jo

    sudoRun as adminsudo apt update

    open "nano" text Editor

    sudo nmap -sn 192.168.1.0/24

    Meaning:

    • Starting Nmap 7.95
      → The program has started running.
      → You are using Nmap version 7.95.

    • https://nmap.org
      → Official Nmap website.

    • 2026-02-12 05:38 EST
      → Date and time when the scan started.
      → EST = Eastern Standard Time.









    No comments:

    Post a Comment