22 ديسمبر 2025

linux interview question 5

 191. How do you change file permissions in Linux? 

● chmod permissions file_name

192. How do you change file ownership in Linux? 

● chown user:group file_name

193. How do you create a new user in Linux? 

● useradd username

194. How do you set a password for a user? 

● passwd username

195. How do you delete a user in Linux? 

● userdel username

196. How do you add a user to a group?

 ● usermod -aG group_name username

197. How do you list groups in Linux? 

● cat /etc/group

198. How do you secure SSH access?

 ● Disable root login by setting PermitRootLogin no in /etc/ssh/sshd_config

199. How do you configure SSH key-based authentication? 

● Copy the public key to ~/.ssh/authorized_keys on the remote machine

200. How do you view system logs in Linux? 

● journalctl or cat /var/log/syslog

ليست هناك تعليقات: