KEMBAR78
Linux Basics | PDF | Computer File | Zip (File Format)
0% found this document useful (0 votes)
18 views7 pages

Linux Basics

The document provides a comprehensive overview of basic Linux commands categorized into file management, user management, networking basics, and process management. Each command is accompanied by a brief description of its function. The publication is authored by Youcef Benabderrezak and was uploaded in December 2024.

Uploaded by

nhrnahidhasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views7 pages

Linux Basics

The document provides a comprehensive overview of basic Linux commands categorized into file management, user management, networking basics, and process management. Each command is accompanied by a brief description of its function. The publication is authored by Youcef Benabderrezak and was uploaded in December 2024.

Uploaded by

nhrnahidhasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/387517966

Linux Basic Commands

Presentation · December 2024

CITATIONS READS

0 483

1 author:

Youcef Benabderrezak
University of Boumerdes
181 PUBLICATIONS 25 CITATIONS

SEE PROFILE

All content following this page was uploaded by Youcef Benabderrezak on 30 December 2024.

The user has requested enhancement of the downloaded file.


Linux Commands by Topic

File Management

Command Description
ls List files in a directory.
cd Change directory.
mkdir Create a new directory.
touch Create an empty file.
cp Copy files or directories.
mv Move or rename files.
rm Remove files or directories.
find Search for files or directories.
du Check disk usage of a directory.
df Check available disk space.

Command Description
pwd Print the current directory.
stat Display file or directory information.
ln Create symbolic or hard links.
basename Extract the filename from a path.
dirname Extract the directory name from a path.
chmod Change file permissions.
chown Change file ownership.
cat Display file content.
more View file content page by page.
less View file content (with backward navigation).

1
Command Description
head Show the first 10 lines of a file.
tail Show the last 10 lines of a file.
split Split files into smaller parts.
wc Count words, lines, and characters in a file.
tar Archive files into a single file.
gzip Compress files.
gunzip Decompress .gz files.
zip Create compressed .zip files.
unzip Extract .zip files.
file Determine a file’s type.

User Management

Command Description
whoami Display the current user.
id Show user and group IDs.
users List logged-in users.
who Show who is logged in.
w Show logged-in users and their activities.
passwd Change the user’s password.
su Switch to another user.
adduser Add a new user.
useradd Add a new user (alternative).
usermod Modify an existing user.

2
Command Description
deluser Remove a user.
userdel Remove a user (alternative).
groupadd Create a new group.
groupdel Delete a group.
groups Show groups for the current user.
chage Manage user password expiration.
finger Display information about a user.
last Show the login history of users.
sudo Execute commands with superuser privileges.
visudo Edit the sudoers file safely.

Command Description
logname Display the current user’s login name.
whoami Confirm the logged-in user.
getent Retrieve user account entries.
gpasswd Manage group passwords.
newgrp Switch to a different group.
usermod Add a user to a group.
pkill -u Kill all processes for a user.
smbpasswd Change Samba user password.
net usershare Manage Samba user shares.
hostnamectl Change or query the system’s hostname.

Networking Basics

3
Command Description
ifconfig Display or configure network interfaces.
ip Manage IP addresses and routes.
ping Check the connection to another host.
traceroute Trace the route packets take to a host.
netstat Show network connections and statistics.
ss Display socket statistics.
nslookup Query DNS for domain name or IP information.
dig Perform DNS queries.
curl Transfer data from or to a server.
wget Download files from the internet.

Command Description
scp Copy files over SSH.
rsync Synchronize files between systems.
ftp Connect to an FTP server.
telnet Connect to a remote host.
ssh Log into a remote machine securely.
arp Display or modify the ARP table.
route Show or change the routing table.
nmap Scan a network for open ports.
tcpdump Capture and analyze network packets.
ethtool Display or modify Ethernet device settings.

Process Management

4
Command Description
nmcli Control NetworkManager from the CLI.
iwconfig Configure wireless network interfaces.
netcat (nc) Network utility for reading/writing.
ip route Manage network routes.
bridge Manage network bridges.
tcpflow Capture and reconstruct TCP flows.
iperf Measure network bandwidth.
mtr Combine ping and traceroute.
host Look up DNS entries.
systemctl restart networking Restart the networking service.

Command Description
ps Show running processes.
top Display real-time process info.
htop Interactive process manager.
kill Terminate a process by PID.
killall Terminate processes by name.
pgrep Find process IDs by name.
pkill Kill processes by name.
bg Resume a suspended job in the background.
fg Bring a job to the foreground.
jobs List active jobs.

5
Command Description
nice Set a priority for a process.
renice Change process priority.
nohup Run a process immune to hangups.
strace Trace system calls made by a process.
lsof List open files.
uptime Show system uptime.
vmstat Report system performance stats.
iostat Display CPU and I/O stats.
sar Collect, report, and save system stats.
watch Run a command periodically.

Command Description
at Schedule a one-time task.
cron Schedule recurring tasks.
crontab Edit or view cron jobs.
systemctl Control system services.
service Start, stop, or restart services.
uptime Show system uptime.
pidof Find process ID by name.
tload Display system load graphically.
schedtool Manage CPU affinity of processes.
taskset Set or retrieve CPU affinity of tasks.

View publication stats

You might also like